Some checks failed
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Failing after 55s
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 5m56s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 3m57s
- **Dockerfile:** Passe COPY-Pfad für Web-Assets auf neuen CI-Workflow an. - **CI:** Füge Schritt zum Staging von Web-Assets vor dem Docker-Build hinzu.
55 lines
2.2 KiB
Docker
55 lines
2.2 KiB
Docker
# ===================================================================
|
|
# Dockerfile for Meldestelle Web-App (Hybrid Build)
|
|
# Version: 3.2.0 - Optimized & Cleaned
|
|
# ===================================================================
|
|
|
|
# === GLOBAL ARGS ===
|
|
ARG CADDY_VERSION=2.11-alpine
|
|
ARG VERSION=1.0.0-SNAPSHOT
|
|
ARG BUILD_DATE
|
|
|
|
# ===================================================================
|
|
# Stage 1: Runtime Stage (Caddy)
|
|
# ===================================================================
|
|
FROM caddy:${CADDY_VERSION}
|
|
|
|
# envsubst für Env-Var-Substitution zur Laufzeit
|
|
RUN apk add --no-cache gettext
|
|
|
|
ARG VERSION
|
|
ARG BUILD_DATE
|
|
|
|
LABEL service="web-app" \
|
|
version="${VERSION}" \
|
|
maintainer="Meldestelle Development Team" \
|
|
build.date="${BUILD_DATE}"
|
|
|
|
# Copy Caddy Config & Entrypoint
|
|
COPY config/docker/caddy/web-app/Caddyfile /etc/caddy/Caddyfile
|
|
COPY config/docker/caddy/web-app/entrypoint.sh /entrypoint.sh
|
|
# config.json als Template ablegen; der Entrypoint erzeugt daraus zur Laufzeit die finale config.json
|
|
COPY config/docker/caddy/web-app/config.json /usr/share/caddy/config.json.tmpl
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Copy Pre-built Static Assets from Host (WasmJs)
|
|
# NOTE: CI (docker-publish.yaml) kopiert die gebauten Artefakte nach
|
|
# config/docker/caddy/web-app/_site/ bevor dieses Image gebaut wird.
|
|
# Lokal musst du vorher bauen:
|
|
# ./gradlew :frontend:shells:meldestelle-web:wasmJsBrowserDistribution -Pproduction=true
|
|
# und die Dateien ebenfalls nach _site/ kopieren.
|
|
COPY config/docker/caddy/web-app/_site/ /usr/share/caddy/
|
|
# index.html wird als Template abgelegt; der Entrypoint erzeugt daraus zur Laufzeit die finale index.html
|
|
RUN mv /usr/share/caddy/index.html /usr/share/caddy/index.html.tmpl
|
|
|
|
# Ensure favicon exists (fallback)
|
|
# Using the shared asset from existing config structure
|
|
COPY config/docker/nginx/web-app/favicon.svg /usr/share/caddy/favicon.svg
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost/health || exit 1
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|