bstein-dev-home/Dockerfile.frontend

22 lines
427 B
Docker
Raw Normal View History

2025-12-18 01:13:04 -03:00
# 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/
2025-12-18 01:13:04 -03:00
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;"]