Introduced `config.json` runtime configuration fetch mechanism to support the "Build Once, Deploy Everywhere" pattern. Replaced NGINX with Caddy for SPA deployment, enabling SPA routing, security headers, and static asset management. Updated Gradle and Kotlin/JS build configurations to align with the new runtime environment. Enhanced Dockerfile and health checks for optimized CI/CD workflows and improved SPA delivery.
70 lines
2.1 KiB
YAML
70 lines
2.1 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:
|
|
GRADLE_VERSION: "${DOCKER_GRADLE_VERSION:-9.2.1}"
|
|
JAVA_VERSION: "${DOCKER_JAVA_VERSION:-25}"
|
|
# 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: no
|
|
ports:
|
|
- "${WEB_APP_PORT:-4000:4000}"
|
|
environment:
|
|
# Runtime Configuration for Caddy Templates
|
|
# Browser can access API via localhost:8081 (Gateway)
|
|
# In Docker network, it might be http://api-gateway:8081, but browser runs on host!
|
|
# Usually, for local dev, we want the browser to hit localhost:8081.
|
|
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
|