added prod docker files

This commit is contained in:
Elmar Kresse
2023-09-20 12:32:10 +02:00
parent e56a78bd75
commit d9a72b5b3e
2 changed files with 41 additions and 0 deletions

14
frontend/Dockerfile_prod Normal file
View File

@@ -0,0 +1,14 @@
# build stage
FROM node:latest as build-stage
WORKDIR /app
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# production stage
FROM nginx:stable as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8000
CMD ["nginx", "-g", "daemon off;"]