Skip to content

Commit e4658a2

Browse files
Adds DC API
1 parent 0c20363 commit e4658a2

21 files changed

+17063
-1
lines changed

.github/workflows/docker-image-auth_api.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Build the Docker image
20-
run: docker build . --file Dockerfile.AuthAPI --tag monorepo_marvel:$(date +%s)
20+
run: docker build . --file Dockerfile.AuthAPI --tag monorepo_auth:$(date +%s)
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Building DC
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/packages/dc/**'
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Build the Docker image
20+
run: docker build . --file Dockerfile.DC --tag monorepo_dc:$(date +%s)

Dockerfile.DC

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM node:14-alpine
2+
3+
WORKDIR /usr/src/app
4+
5+
ENV NODE_ENV=local
6+
7+
COPY /src/packages/dc/package*.json ./
8+
9+
RUN npm install
10+
11+
COPY . .
12+
13+
RUN npm run build
14+
15+
16+
CMD ["node", "dist/main"]

src/packages/cockpit/nginx.conf

+10
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ http {
5656
proxy_set_header Host $hml_base_url;
5757
proxy_pass https://$hml_base_url/api/marvel$1?args;
5858
}
59+
60+
location ~ ^/api/DC(/?.*)$ {
61+
proxy_pass http://dc_api:3001/DC$1?args;
62+
error_page 502 = @fallback_dc_api;
63+
}
64+
65+
location @fallback_dc_api {
66+
proxy_set_header Host $hml_base_url;
67+
proxy_pass https://$hml_base_url/api/DC$1?args;
68+
}
5969

6070
}
6171
}

src/packages/dc/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
*.env
3+
env.*
4+
dist
5+
.DS_Store

src/packages/dc/README.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<p align="center">
2+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
3+
</p>
4+
5+
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
6+
[circleci-url]: https://circleci.com/gh/nestjs/nest
7+
8+
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
9+
<p align="center">
10+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
11+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
12+
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
13+
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
14+
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
15+
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
16+
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
17+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
18+
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
19+
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
20+
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
21+
</p>
22+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
23+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
24+
25+
## Description
26+
27+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
28+
29+
## Installation
30+
31+
```bash
32+
$ npm install
33+
```
34+
35+
## Running the app
36+
37+
```bash
38+
# development
39+
$ npm run start
40+
41+
# watch mode
42+
$ npm run start:dev
43+
44+
# production mode
45+
$ npm run start:prod
46+
```
47+
48+
## Test
49+
50+
```bash
51+
# unit tests
52+
$ npm run test
53+
54+
# e2e tests
55+
$ npm run test:e2e
56+
57+
# test coverage
58+
$ npm run test:cov
59+
```
60+
61+
## Support
62+
63+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
64+
65+
## Stay in touch
66+
67+
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
68+
- Website - [https://nestjs.com](https://nestjs.com/)
69+
- Twitter - [@nestframework](https://twitter.com/nestframework)
70+
71+
## License
72+
73+
Nest is [MIT licensed](LICENSE).

src/packages/dc/nest-cli.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"collection": "@nestjs/schematics",
3+
"sourceRoot": "src"
4+
}

0 commit comments

Comments
 (0)