22 lines
493 B
Docker
22 lines
493 B
Docker
# Build stage
|
|
FROM registry.bstein.dev/bstein/node:20-alpine-arm64 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 registry.bstein.dev/bstein/nginx:1.27-alpine-arm64
|
|
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;"]
|