- Clone all 5 Zonemaster component repos (LDNS, Engine, CLI, Backend, GUI) - Dockerfile.backend: 8-stage multi-stage build LDNS→Engine→CLI→Backend - Dockerfile.gui: Astro static build served via nginx - docker-compose.yml: backend (internal) + frontend (port 5353) - nginx.conf: root redirects to /es/, /api/ proxied to backend - zonemaster-gui/config.ts: defaultLanguage set to 'es' (Spanish) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
774 B
Docker
24 lines
774 B
Docker
# ── Stage 1: Build Astro static site ─────────────────────────────────────────
|
|
FROM node:22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY zonemaster-gui/package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY zonemaster-gui/ ./
|
|
|
|
# Build as static production site with Spanish as default, API proxied via /api
|
|
ENV NODE_ENV=production
|
|
ENV PUBLIC_API_URL=/api
|
|
ENV PUBLIC_BASE_URL=/
|
|
RUN npm run build
|
|
|
|
# ── Stage 2: Serve with nginx ─────────────────────────────────────────────────
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/public/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|