meldestelle/dc-gui.yaml
Stefan Mogeritsch 1aaaf8a203 build: optimize Docker setup for Caddy SPA and improve runtime stability
Updated Dockerfile to streamline the hybrid build process and optimize artifact integration. Modified Caddyfile for better routing logic, enhanced security headers, Prometheus metrics, and improved API proxy handling. Adjusted `dc-gui.yaml` for container stability and simplified runtime configuration for `apiBaseUrl`. Expanded documentation with troubleshooting and session logs.
2026-02-04 16:31:26 +01:00

66 lines
1.9 KiB
YAML

name: "${PROJECT_NAME:-meldestelle}"
services:
# ==========================================
# 3. FRONTEND (UI)
# ==========================================
# --- WEB-APP ---
web-app:
build:
context: . # Wichtig: Root Context für Monorepo Zugriff
dockerfile: config/docker/caddy/web-app/Dockerfile
args:
# Frontend spezifisch:
CADDY_VERSION: "${DOCKER_CADDY_VERSION:-2.9-alpine}"
# Metadaten:
VERSION: "${DOCKER_VERSION:-1.0.0-SNAPSHOT}"
BUILD_DATE: "${DOCKER_BUILD_DATE}"
labels:
- "org.opencontainers.image.created=${DOCKER_BUILD_DATE}"
container_name: "${PROJECT_NAME:-meldestelle}-web-app"
restart: unless-stopped
ports:
- "${WEB_APP_PORT:-4000:4000}"
environment:
# Runtime Configuration for Caddy Templates
# Browser can access API via localhost:8081 (Gateway)
API_BASE_URL: "${WEB_APP_API_URL:-http://localhost:8081}"
depends_on:
api-gateway:
condition: "service_started"
networks:
meldestelle-network:
aliases:
- "web-app"
profiles: [ "gui", "all" ]
# --- DESKTOP-APP (optional) ---
# desktop-app:
# build:
# context: .
# dockerfile: config/docker/nginx/desktop-app/Dockerfile
# args:
# BUILD_DATE: "${DOCKER_BUILD_DATE}"
# labels:
# - "org.opencontainers.image.created=${DOCKER_BUILD_DATE}"
# container_name: "${PROJECT_NAME:-meldestelle}-desktop-app"
# restart: no
# environment:
# API_BASE_URL: "http://api-gateway:8081"
# ports:
# - "${DESKTOP_APP_VNC_PORT:-5901:5901}"
# - "${DESKTOP_APP_NOVNC_PORT:-6080:6080}"
# depends_on:
# api-gateway:
# condition: "service_started"
# networks:
# meldestelle-network:
# aliases:
# - "desktop-app"
# profiles: [ "gui", "all" ]
networks:
meldestelle-network:
driver: bridge