Files
htwkalender/frontend/Dockerfile_prod
2023-09-20 12:32:10 +02:00

15 lines
353 B
Plaintext

# 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;"]