Skip to content

Commit

Permalink
Update dockerfile for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
qtc-de committed Jul 15, 2024
1 parent c11d46f commit 8fba418
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM node:lts-alpine
###########################################
### Build Stage ###
###########################################
FROM node:lts-alpine AS frontend-builder

WORKDIR /app
COPY package*.json .
Expand All @@ -13,7 +16,10 @@ COPY . .
RUN chown -R rpv:rpv /app \
&& su rpv -c "npm run build"

USER rpv:rpv
EXPOSE 5173

CMD ["npm", "run", "dev", "--", "--host"]
###########################################
### Deploy Stage ###
###########################################
FROM nginx:alpine-slim

COPY --from=frontend-builder /app/dist/. /usr/share/nginx/html

0 comments on commit 8fba418

Please sign in to comment.