# Foxhunt Monitoring Stack # # Services: # - Prometheus: Metrics collection and alerting # - Grafana: Metrics visualization # - AlertManager: Alert routing and notification # - PostgreSQL Exporter: Database metrics # - Redis Exporter: Cache metrics version: '3.8' services: # Prometheus - Metrics collection prometheus: image: prom/prometheus:v2.48.0 container_name: foxhunt-prometheus restart: unless-stopped ports: - "9099:9090" volumes: - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro - ./prometheus/alerts:/etc/prometheus/alerts:ro - prometheus-data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' - '--storage.tsdb.retention.time=30d' - '--web.enable-lifecycle' - '--web.enable-admin-api' networks: - foxhunt-monitoring # Grafana - Metrics visualization grafana: image: grafana/grafana:10.2.2 container_name: foxhunt-grafana restart: unless-stopped ports: - "3000:3000" environment: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=foxhunt2025 - GF_USERS_ALLOW_SIGN_UP=false - GF_SERVER_ROOT_URL=http://localhost:3000 - GF_INSTALL_PLUGINS= volumes: - ./grafana:/etc/grafana/provisioning/dashboards:ro - grafana-data:/var/lib/grafana depends_on: - prometheus networks: - foxhunt-monitoring # AlertManager - Alert routing alertmanager: image: prom/alertmanager:v0.26.0 container_name: foxhunt-alertmanager restart: unless-stopped ports: - "9093:9093" volumes: - ./alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro - alertmanager-data:/alertmanager command: - '--config.file=/etc/alertmanager/alertmanager.yml' - '--storage.path=/alertmanager' networks: - foxhunt-monitoring # PostgreSQL Exporter - Database metrics postgres-exporter: image: prometheuscommunity/postgres-exporter:v0.15.0 container_name: foxhunt-postgres-exporter restart: unless-stopped ports: - "9187:9187" environment: - DATA_SOURCE_NAME=postgresql://foxhunt:foxhunt@postgres:5432/foxhunt?sslmode=disable networks: - foxhunt-monitoring # Redis Exporter - Cache metrics redis-exporter: image: oliver006/redis_exporter:v1.55.0 container_name: foxhunt-redis-exporter restart: unless-stopped ports: - "9121:9121" environment: - REDIS_ADDR=redis://redis:6379 networks: - foxhunt-monitoring # Node Exporter - System metrics (API Gateway host) node-exporter-gateway: image: prom/node-exporter:v1.7.0 container_name: foxhunt-node-exporter-gateway restart: unless-stopped ports: - "9100:9100" volumes: - /proc:/host/proc:ro - /sys:/host/sys:ro - /:/rootfs:ro command: - '--path.procfs=/host/proc' - '--path.sysfs=/host/sys' - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)' networks: - foxhunt-monitoring networks: foxhunt-monitoring: name: foxhunt-monitoring driver: bridge volumes: prometheus-data: name: foxhunt-prometheus-data grafana-data: name: foxhunt-grafana-data alertmanager-data: name: foxhunt-alertmanager-data