fix: merge monitoring into main docker-compose.yml
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 51s

All services (app + Prometheus + Grafana + node-exporter + cAdvisor)
are now in a single docker-compose.yml. One `docker compose up -d`
starts everything. No more separate monitoring file needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 15:39:26 +02:00
parent a77b500e50
commit 20e8565929
2 changed files with 98 additions and 4 deletions

View File

@@ -66,10 +66,6 @@ jobs:
echo "=== Deploy summary ==="
docker compose ps
echo "Health: $(curl -sf http://localhost:8001/health 2>/dev/null || echo 'FAILED')"
echo "=== Starting monitoring ==="
docker compose -f docker-compose.yml -f docker-compose.monitoring.yml up -d prometheus grafana node-exporter cadvisor || true
docker compose -f docker-compose.yml -f docker-compose.monitoring.yml ps || true
ENDSSH
- name: Wait for frontend

View File

@@ -180,6 +180,100 @@ services:
profiles:
- with-ollama
# ===========================================
# Prometheus - Metrics Collection
# ===========================================
prometheus:
image: prom/prometheus:v2.52.0
container_name: wordly-prometheus
restart: unless-stopped
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./docker/prometheus/alerts.yml:/etc/prometheus/alerts.yml:ro
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=30d'
- '--storage.tsdb.retention.size=5GB'
- '--web.enable-lifecycle'
networks:
- wordly-network
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9090/-/healthy"]
interval: 30s
timeout: 5s
retries: 3
# ===========================================
# Grafana - Dashboards & Visualization
# ===========================================
grafana:
image: grafana/grafana:11.0.0
container_name: wordly-grafana
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-WordlyGrafana2026!}
- GF_USERS_ALLOW_SIGN_UP=false
- GF_SERVER_ROOT_URL=https://monitoring.wordly.art
- GF_INSTALL_PLUGINS=grafana-clock-panel
volumes:
- grafana_data:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning:ro
- ./docker/grafana/dashboards:/var/lib/grafana/dashboards:ro
ports:
- "3001:3000"
networks:
- wordly-network
depends_on:
prometheus:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 5s
retries: 3
# ===========================================
# Node Exporter - System Metrics
# ===========================================
node-exporter:
image: prom/node-exporter:v1.8.0
container_name: wordly-node-exporter
restart: unless-stopped
pid: host
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--path.rootfs=/rootfs'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|etc|var/lib/docker)($$|/)'
networks:
- wordly-network
# ===========================================
# cAdvisor - Container Metrics
# ===========================================
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
container_name: wordly-cadvisor
restart: unless-stopped
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk:/dev/disk:ro
privileged: true
devices:
- /dev/kmsg
networks:
- wordly-network
# ===========================================
# Networks
# ===========================================
@@ -204,3 +298,7 @@ volumes:
driver: local
ollama_data:
driver: local
prometheus_data:
driver: local
grafana_data:
driver: local