minesweeper-frontend/Dockerfile
Jose134 22a304907e
Some checks failed
gitea/minesweeper-frontend/pipeline/head There was a failure building this commit
Fix deployment
2025-01-22 15:32:52 +01:00

13 lines
328 B
Docker

FROM node:20-alpine as builder
WORKDIR /app
COPY . .
ARG VITE_SOCKET_URL
ENV VITE_SOCKET_URL $VITE_SOCKET_URL
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 5173
CMD ["nginx", "-g", "daemon off;"]