98 lines
3.2 KiB
YAML
98 lines
3.2 KiB
YAML
# ===================================================================
|
|
# Docker Compose - Client Applications
|
|
# Meldestelle Project - Client Layer Configuration
|
|
# ===================================================================
|
|
# Usage:
|
|
# Development: docker-compose -f docker-compose.yml -f docker-compose.services.yml -f docker-compose.clients.yml up
|
|
# Production: docker-compose -f docker-compose.prod.yml -f docker-compose.services.yml -f docker-compose.clients.yml up
|
|
# Clients only: docker-compose -f docker-compose.clients.yml up
|
|
# ===================================================================
|
|
|
|
#version: '3.8'
|
|
|
|
services:
|
|
# ===================================================================
|
|
# Web Application (Kotlin Multiplatform Client)
|
|
# ===================================================================
|
|
web-app:
|
|
build:
|
|
context: .
|
|
dockerfile: dockerfiles/clients/web-app/Dockerfile
|
|
args:
|
|
GRADLE_VERSION: 8.14
|
|
JAVA_VERSION: 21
|
|
NGINX_VERSION: alpine
|
|
image: meldestelle/web-app:latest
|
|
container_name: meldestelle-web-app
|
|
ports:
|
|
- "3001:80"
|
|
depends_on:
|
|
- api-gateway
|
|
environment:
|
|
# Nginx Configuration
|
|
- NGINX_HOST=localhost
|
|
- NGINX_PORT=80
|
|
|
|
# Backend API Configuration
|
|
- API_BASE_URL=http://api-gateway:8080
|
|
- AUTH_SERVER_URL=http://auth-server:8081
|
|
|
|
# Application Configuration
|
|
- APP_NAME=Meldestelle Web App
|
|
- APP_VERSION=1.0.0
|
|
- NODE_ENV=production
|
|
networks:
|
|
- meldestelle-network
|
|
volumes:
|
|
# Nginx logs
|
|
- web-app-logs:/var/log/nginx
|
|
# Static assets cache (optional)
|
|
- web-app-cache:/var/cache/nginx
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 15s
|
|
restart: unless-stopped
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.web-app.rule=Host(`localhost`) || Host(`web.meldestelle.local`)"
|
|
- "traefik.http.services.web-app.loadbalancer.server.port=80"
|
|
- "prometheus.scrape=false" # Nginx metrics handled separately if needed
|
|
|
|
# ===================================================================
|
|
# Future Client Applications
|
|
# ===================================================================
|
|
|
|
# Mobile App (if implemented as PWA proxy)
|
|
# mobile-app:
|
|
# build:
|
|
# context: .
|
|
# dockerfile: dockerfiles/clients/mobile-app/Dockerfile
|
|
# image: meldestelle/mobile-app:latest
|
|
# container_name: meldestelle-mobile-app
|
|
# ports:
|
|
# - "3002:80"
|
|
# depends_on:
|
|
# - api-gateway
|
|
# networks:
|
|
# - meldestelle-network
|
|
# restart: unless-stopped
|
|
|
|
# ===================================================================
|
|
# Volumes for Client Applications
|
|
# ===================================================================
|
|
volumes:
|
|
web-app-logs:
|
|
driver: local
|
|
web-app-cache:
|
|
driver: local
|
|
|
|
# ===================================================================
|
|
# Networks (inherits from main docker-compose.yml or creates if standalone)
|
|
# ===================================================================
|
|
networks:
|
|
meldestelle-network:
|
|
driver: bridge
|