build(frontend): update docker image to use production env
All checks were successful
CI / Maven unit tests (push) Successful in 14s
CI / Build and push images (push) Successful in 1m22s
CI / Deploy to server (push) Successful in 10s

This commit is contained in:
2026-08-17 18:23:21 +01:00
parent da38e21935
commit 4c06a9484b

View File

@@ -1,9 +1,13 @@
FROM node:20-alpine
# --- Build stage ---
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm npm ci
COPY . .
EXPOSE 5173
CMD ["npm", "run", "dev"]
RUN npm run build
# --- Production stage ---
FROM nginx:1.27-alpine AS prod
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]