22 lines
427 B
Docker
22 lines
427 B
Docker
# Build stage
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
|
|
COPY frontend/package*.json ./
|
|
RUN npm ci --ignore-scripts
|
|
|
|
COPY frontend/ ./
|
|
COPY media/ ./public/media/
|
|
RUN npm run build
|
|
|
|
# Runtime stage
|
|
FROM nginx:1.27-alpine
|
|
WORKDIR /usr/share/nginx/html
|
|
|
|
# Minimal nginx config with SPA fallback.
|
|
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist ./
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|