### feat: füge Mail-Service-
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Failing after 58s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 5m59s
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 5m48s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 6m2s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m52s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m44s
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Failing after 58s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 5m59s
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 5m48s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 6m2s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 1m52s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m44s
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
metrics
|
||||
}
|
||||
|
||||
:4000 {
|
||||
:80 {
|
||||
root * /usr/share/caddy
|
||||
log {
|
||||
output stdout
|
||||
@@ -17,14 +17,34 @@
|
||||
|
||||
encode gzip zstd
|
||||
|
||||
handle /api/* {
|
||||
reverse_proxy api-gateway:8081
|
||||
# Reverse Proxy: Plan-B leitet nur /api/mail an den Mail-Service weiter (kein API-Gateway nötig)
|
||||
handle /api/mail/* {
|
||||
reverse_proxy mail-service:8085
|
||||
}
|
||||
|
||||
handle /health {
|
||||
respond "healthy" 200
|
||||
}
|
||||
|
||||
# Korrekte MIME für .wasm sicherstellen (Caddy erkennt es i. d. R. automatisch; hier explizit)
|
||||
@wasm {
|
||||
path *.wasm
|
||||
}
|
||||
header @wasm Content-Type "application/wasm"
|
||||
|
||||
# Caching-Strategie: Immutable Assets (hash-Dateien) lange cachen
|
||||
@immutable {
|
||||
path *.js *.css *.wasm *.png *.svg *.ico *.woff2 *.map
|
||||
}
|
||||
header @immutable Cache-Control "public, max-age=31536000, immutable"
|
||||
|
||||
# Keine Cache-Header für SPA-Einstieg und Laufzeitkonfig
|
||||
@nocache {
|
||||
path /index.html /config.json
|
||||
}
|
||||
header @nocache Cache-Control "no-store"
|
||||
|
||||
# Static file serving mit SPA-Fallback
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
|
||||
@@ -31,9 +31,9 @@ COPY config/docker/caddy/web-app/entrypoint.sh /entrypoint.sh
|
||||
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
|
||||
# NOTE: You must run `./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution -Pproduction=true` locally first!
|
||||
COPY frontend/shells/meldestelle-portal/build/dist/js/productionExecutable/ /usr/share/caddy/
|
||||
# Copy Pre-built Static Assets from Host (WasmJs)
|
||||
# NOTE: You must run `./gradlew :frontend:shells:meldestelle-web:wasmJsBrowserDistribution -Pproduction=true` locally first!
|
||||
COPY frontend/shells/meldestelle-web/build/dist/wasmJs/productionExecutable/ /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
|
||||
|
||||
@@ -41,10 +41,10 @@ RUN mv /usr/share/caddy/index.html /usr/share/caddy/index.html.tmpl
|
||||
# Using the shared asset from existing config structure
|
||||
COPY config/docker/nginx/web-app/favicon.svg /usr/share/caddy/favicon.svg
|
||||
|
||||
EXPOSE 4000
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:4000/health || exit 1
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost/health || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"apiBaseUrl": "${API_BASE_URL}",
|
||||
"mailServiceUrl": "${MAIL_SERVICE_URL}",
|
||||
"keycloakUrl": "${KEYCLOAK_URL}"
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Ersetze ${API_BASE_URL} und ${KEYCLOAK_URL} in index.html und config.json zur Container-Startzeit.
|
||||
# Ersetze ${API_BASE_URL}, ${MAIL_SERVICE_URL} und ${KEYCLOAK_URL} in index.html und config.json zur Container-Startzeit.
|
||||
# Caddy bekommt fertige, statische Dateien — kein Template-Parsing mehr nötig.
|
||||
envsubst '${API_BASE_URL} ${KEYCLOAK_URL}' \
|
||||
envsubst '${API_BASE_URL} ${MAIL_SERVICE_URL} ${KEYCLOAK_URL}' \
|
||||
< /usr/share/caddy/index.html.tmpl \
|
||||
> /usr/share/caddy/index.html
|
||||
|
||||
envsubst '${API_BASE_URL} ${KEYCLOAK_URL}' \
|
||||
envsubst '${API_BASE_URL} ${MAIL_SERVICE_URL} ${KEYCLOAK_URL}' \
|
||||
< /usr/share/caddy/config.json.tmpl \
|
||||
> /usr/share/caddy/config.json
|
||||
|
||||
|
||||
Reference in New Issue
Block a user