chore(docker): modularize and restructure Docker Compose configuration
- Reorganized `docker-compose.yaml` by splitting it into modular files: `dc-infra.yaml`, `dc-backend.yaml`, `dc-gui.yaml`, and `dc-ops.yaml`. - Simplified structure by removing redundant `docker-compose.frontend.yaml` and `docker-compose.services.yaml` files. - Improved maintainability and modularity of service definitions across infrastructure, backend, GUI, and ops layers.
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
name: "${PROJECT_NAME:-meldestelle}"
|
||||
|
||||
services:
|
||||
# ==========================================
|
||||
# 3. FRONTEND (UI)
|
||||
# ==========================================
|
||||
|
||||
# --- WEB-APP ---
|
||||
web-app:
|
||||
build:
|
||||
context: . # Wichtig: Root Context für Monorepo Zugriff
|
||||
dockerfile: config/docker/nginx/web-app/Dockerfile
|
||||
args:
|
||||
GRADLE_VERSION: "${DOCKER_GRADLE_VERSION:-9.2.1}"
|
||||
JAVA_VERSION: "${DOCKER_JAVA_VERSION:-25}"
|
||||
# Frontend spezifisch:
|
||||
NODE_VERSION: "${DOCKER_NODE_VERSION:-24.12.0}"
|
||||
NGINX_IMAGE_TAG: "${DOCKER_NGINX_VERSION:-1.28.0-alpine}"
|
||||
WEB_BUILD_PROFILE: "${WEB_BUILD_PROFILE:-dev}" # dev oder prod
|
||||
# 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:
|
||||
dummy_var: "prevent_empty_block"
|
||||
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
|
||||
Reference in New Issue
Block a user