Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
split docker files
  • Loading branch information
Rodolfo committed Aug 20, 2022
commit 01def588f23f59619c48384a199195c821b476dd
2 changes: 1 addition & 1 deletion .github/workflows/time-tracker-ui-cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build the docker image
run: |-
docker build \
--target production_prod -t timetracker_ui \
--target production_prod -t timetracker_ui -f Dockerfile_prod \
.

- name: Publish docker image to prod azure container registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/time-tracker-ui-cd-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build the docker image
run: |-
docker build \
--target production_stage -t timetracker_ui \
--target production -t timetracker_ui -f Dockerfile_stage \
.

- name: Publish docker image to stage azure container registry
Expand Down
26 changes: 0 additions & 26 deletions Dockerfile

This file was deleted.

13 changes: 13 additions & 0 deletions Dockerfile_prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:14-alpine AS building
WORKDIR /app
COPY . /app
RUN npm cache clean --force && npm install
EXPOSE 4200 9876
RUN source .prod.env && npm run build


FROM nginx:1.21 AS production
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=building /app/dist/time-tracker /usr/share/nginx/html
EXPOSE 80

13 changes: 13 additions & 0 deletions Dockerfile_stage
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:14-alpine AS building
WORKDIR /app
COPY . /app
RUN npm cache clean --force && npm install
EXPOSE 4200 9876
RUN source .stage.env && npm run build


FROM nginx:1.21 AS production
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=building /app/dist/time-tracker /usr/share/nginx/html
EXPOSE 80