meldestelle/dc-ops.yaml
Stefan Mogeritsch b9ec070993
Some checks failed
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Has been cancelled
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Has been cancelled
docs: log session outcomes and apply enhancements across multiple components
- **Docker Fixes:** Resolved failed builds for Gateway and Ping services by switching to `eclipse-temurin:21-jdk-alpine`, correcting Gradle configurations, and fixing cache mount paths.
- **ZNS-Import Consul Registration:** Enabled Consul service discovery by updating `application.yaml` and `build.gradle.kts`.
- **pgAdmin Provisioning:** Preconfigured the database server in `servers.json` and updated `dc-ops.yaml` for seamless setup.
- **Postman Documentation:** Added a detailed Postman test guide covering environment setup, endpoint groups, and recommended test sequences.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
2026-04-03 14:24:46 +02:00

156 lines
4.8 KiB
YAML

name: "${PROJECT_NAME:-meldestelle}"
services:
# ==========================================
# 4. OPS & TOOLS (Monitoring & Admin)
# ==========================================
# --- EMAIL TESTING: Mailpit ---
mailpit:
image: "${MAILPIT_IMAGE:-axllent/mailpit:v1.29}"
container_name: "${PROJECT_NAME:-meldestelle}-mailpit"
restart: unless-stopped
profiles: [ "dev-tools", "all" ]
ports:
- "${MAILPIT_WEB_PORT:-8025:8025}" # Web UI
- "${MAILPIT_SMTP_PORT:-1025:1025}" # SMTP Port
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8025/" ]
interval: 30s
timeout: 10s
retries: 3
networks:
meldestelle-network:
# --- DATENBANK-MANAGEMENT-TOOL: pgAdmin4 ---
pgadmin:
image: "${PGADMIN_IMAGE:-dpage/pgadmin4:8}"
container_name: "${PROJECT_NAME:-meldestelle}-pgadmin"
restart: unless-stopped
profiles: [ "tools", "all" ]
ports:
- "${PGADMIN_PORT:-8888:80}"
environment:
PGADMIN_DEFAULT_EMAIL: "${PGADMIN_EMAIL:-meldestelle@mo-code.at}"
PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_PASSWORD:-pgadmin}"
volumes:
- "pgadmin-data:/var/lib/pgadmin"
- "./config/docker/pgadmin/servers.json:/pgadmin4/servers.json:ro"
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:80/" ]
interval: 30s
timeout: 10s
retries: 3
networks:
meldestelle-network:
aliases:
- "pgadmin"
# --- MONITORING: Postgres Exporter ---
postgres-exporter:
image: "${POSTGRES_EXPORTER_IMAGE:-prometheuscommunity/postgres-exporter:v0.18.0}"
container_name: "${PROJECT_NAME:-meldestelle}-postgres-exporter"
restart: unless-stopped
profiles: [ "ops", "all" ]
environment:
DATA_SOURCE_NAME: "postgresql://${POSTGRES_USER:-pg-user}:${POSTGRES_PASSWORD:-pg-password}@postgres:5432/${POSTGRES_DB:-pg-meldestelle-db}?sslmode=disable"
depends_on:
postgres:
condition: "service_healthy"
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:9187/metrics" ]
interval: 30s
timeout: 10s
retries: 3
networks:
meldestelle-network:
aliases:
- "postgres-exporter"
# --- MONITORING: Alertmanager ---
alertmanager:
image: "${ALERTMANAGER_IMAGE:-prom/alertmanager:v0.29.0}"
container_name: "${PROJECT_NAME:-meldestelle}-alertmanager"
restart: unless-stopped
ports:
- "${ALERTMANAGER_PORT:-9093:9093}"
volumes:
- "./config/docker/monitoring/alertmanager/alertmanager.yaml:/etc/alertmanager/alertmanager.yaml:Z"
command:
- --config.file=/etc/alertmanager/alertmanager.yaml
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:9093/-/healthy" ]
interval: 30s
timeout: 10s
retries: 3
profiles: [ "ops", "all" ]
networks:
meldestelle-network:
aliases:
- "alertmanager"
# --- MONITORING: Prometheus ---
prometheus:
image: "${PROMETHEUS_IMAGE:-prom/prometheus:v3.7.3}"
container_name: "${PROJECT_NAME:-meldestelle}-prometheus"
restart: unless-stopped
ports:
- "${PROMETHEUS_PORT:-9090:9090}"
volumes:
- "prometheus-data:/prometheus"
- "./config/docker/monitoring/prometheus:/etc/prometheus:Z"
- "./config/docker/monitoring/prometheus/rules:/etc/prometheus/rules:Z"
command:
- --web.enable-lifecycle
- --config.file=/etc/prometheus/prometheus.yaml
- --storage.tsdb.retention.time=15d
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://localhost:9090/-/healthy" ]
interval: "30s"
timeout: "10s"
retries: "3"
start_period: "30s"
networks:
meldestelle-network:
aliases:
- "prometheus"
profiles: [ "ops", "all" ]
# --- MONITORING: Grafana ---
grafana:
image: "${GF_IMAGE:-grafana/grafana:12.3}"
container_name: "${PROJECT_NAME:-meldestelle}-grafana"
restart: unless-stopped
environment:
GF_SECURITY_ADMIN_USER: "${GF_ADMIN_USER:-gf-admin}"
GF_SECURITY_ADMIN_PASSWORD: "${GF_ADMIN_PASSWORD:-gf-password}"
ports:
- "${GF_PORT:-3000:3000}"
volumes:
- grafana-data:/var/lib/grafana
- ./config/docker/monitoring/grafana/provisioning:/etc/grafana/provisioning:Z
- ./config/docker/monitoring/grafana/dashboards:/var/lib/grafana/dashboards:Z
depends_on:
prometheus:
condition: "service_healthy"
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health" ]
interval: "30s"
timeout: "10s"
retries: "3"
start_period: "30s"
networks:
meldestelle-network:
aliases:
- "grafana"
profiles: [ "ops", "all" ]
volumes:
pgadmin-data:
prometheus-data:
grafana-data:
networks:
meldestelle-network:
driver: bridge