Files
gnommoeditor/Dockerfile.frontend
T

20 lines
464 B
Docker
Raw Normal View History

2026-04-11 09:24:21 +02:00
# Stage 1: build the Vite app
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
# VITE_ env vars are baked into the bundle at build time
ARG VITE_GNOMMOWEB_URL
ENV VITE_GNOMMOWEB_URL=${VITE_GNOMMOWEB_URL}
RUN npm run build
# Stage 2: serve with nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx/nginx.prod.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]