# ---- Étape 1 : build du site avec Zola ---- FROM ghcr.io/getzola/zola:v0.19.2 AS builder WORKDIR /app COPY . . # Construit le site statique dans /app/public # --base-url permet à Coolify de surcharger l'URL via la variable BASE_URL ARG BASE_URL=/ RUN ["zola", "build", "--base-url", "/"] # ---- Étape 2 : service du site avec nginx ---- FROM nginx:1.27-alpine # Config nginx (gestion des 404, cache des assets) COPY nginx.conf /etc/nginx/conf.d/default.conf # Copie le site généré COPY --from=builder /app/public /usr/share/nginx/html EXPOSE 80 HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \ CMD wget -q --spider http://localhost/ || exit 1 CMD ["nginx", "-g", "daemon off;"]