Skip to content

Commit

Permalink
move frontend dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Jan 6, 2024
1 parent 6c72a8e commit 7e63ff9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
18 changes: 9 additions & 9 deletions app/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ services:
depends_on:
- api

# frontend:
# image: frontend
# build:
# dockerfile: ./docker/frontend/Dockerfile
# ports:
# - 8080:5003
# restart: unless-stopped
# depends_on:
# - api
frontend:
image: frontend
build:
dockerfile: ./frontend/Dockerfile
ports:
- 8080:5003
restart: unless-stopped
depends_on:
- api

api:
image: api
Expand Down
3 changes: 2 additions & 1 deletion app/docker/frontend/Dockerfile → app/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM node:20.9.0 as build-stage
WORKDIR /app
COPY package*.json ./
COPY env.template ../.env
COPY ./frontend .
RUN npm update
RUN npm run build

FROM nginx:1.24.0 as production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY --from=build-stage /.env .env
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
EXPOSE 5003

0 comments on commit 7e63ff9

Please sign in to comment.