minesweeper-frontend/Dockerfile
Jose134 bd6fdf2a9e
All checks were successful
gitea/minesweeper-frontend/pipeline/head This commit looks good
New vite config and dockerfile for prod
2025-01-22 00:47:24 +01:00

13 lines
355 B
Docker

FROM node:20-alpine as builder
WORKDIR /app
COPY . .
ARG VITE_APP_BACKEND_ADDRESS
ENV VITE_APP_BACKEND_ADDRESS $VITE_APP_BACKEND_ADDRESS
RUN npm install
RUN npm run build
FROM nginx:1.25.4-alpine-slim as prod
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]