This repository has been archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐳 📝 patched docker configs and updated docker docs (#45)
- Loading branch information
Showing
8 changed files
with
178 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
FROM node:12-buster AS base | ||
ENV PATH=$PATH:/usr/src/app/node_modules/.bin | ||
ENV PATH=$PATH:/usr/src/app/node_modules/.bin \ | ||
PORT=4000 | ||
EXPOSE 4000 | ||
|
||
WORKDIR /usr/src/app | ||
COPY package*.json ./ | ||
RUN npm install | ||
|
||
FROM base as dev | ||
ENV NODE_ENV=development \ | ||
PORT=4000 | ||
RUN npm install | ||
EXPOSE 4000 | ||
CMD npm run watch | ||
|
||
FROM base as build | ||
RUN npm ci | ||
COPY . . | ||
RUN npm run build | ||
|
||
FROM node:12-alpine as prod | ||
ENV NODE_ENV=production | ||
COPY --from=build /usr/src/app/package*.json ./ | ||
RUN npm install --production | ||
COPY --from=build /usr/src/app/dist ./ | ||
ENV PORT=8080 | ||
EXPOSE 8080 | ||
CMD npm run start | ||
COPY --from=build /usr/src/app/dist ./dist | ||
CMD npm run start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
version: "3.7" | ||
|
||
services: | ||
|
||
redis: | ||
image: redis:alpine | ||
restart: always | ||
volumes: | ||
- redis-data:/data | ||
command: --appendonly yes | ||
networks: | ||
- registrum-net | ||
|
||
mongo: | ||
restart: always | ||
image: mongo:latest | ||
volumes: | ||
- mongo-data:/data/db | ||
networks: | ||
- registrum-net | ||
|
||
api: | ||
build: | ||
context: api | ||
target: prod | ||
image: docker.pkg.github.com/ckanich-classrooms/final-project-dream-team-1/api:master | ||
restart: always | ||
environment: | ||
- MONGODB_URI=mongodb://mongo:27017/registrum | ||
- REDIS_URL=redis://redis | ||
- NODE_ENV=production | ||
- BASE_PATH=/api | ||
depends_on: | ||
- mongo | ||
- redis | ||
networks: | ||
- registrum-net | ||
|
||
client: | ||
build: | ||
context: client | ||
target: prod | ||
image: docker.pkg.github.com/ckanich-classrooms/final-project-dream-team-1/client:master | ||
restart: always | ||
depends_on: | ||
- api | ||
ports: | ||
- 8080:80 | ||
networks: | ||
- registrum-net | ||
|
||
networks: | ||
registrum-net: | ||
|
||
volumes: | ||
mongo-data: | ||
redis-data: |
Oops, something went wrong.