tracksolid_timescale_grafan.../docker-compose.yaml

82 lines
2.3 KiB
YAML
Raw Normal View History

2026-04-07 18:34:40 +00:00
services:
timescale_db:
image: timescale/timescaledb-ha:pg16-ts2.15
2026-04-07 18:34:40 +00:00
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- timescale-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
ingest_movement:
build:
2026-04-07 18:34:40 +00:00
context: .
dockerfile: Dockerfile
command: sh -c "python run_migrations.py && python ingest_movement_rev.py"
2026-04-07 18:34:40 +00:00
restart: always
depends_on:
timescale_db:
condition: service_healthy
env_file: .env
2026-04-07 18:34:40 +00:00
ingest_events:
build:
2026-04-07 18:34:40 +00:00
context: .
dockerfile: Dockerfile
command: sh -c "python run_migrations.py && python ingest_events_rev.py"
2026-04-07 18:34:40 +00:00
restart: always
depends_on:
timescale_db:
condition: service_healthy
env_file: .env
webhook_receiver:
build:
context: .
dockerfile: Dockerfile
command: sh -c "python run_migrations.py && uvicorn webhook_receiver_rev:app --host 0.0.0.0 --port 8888 --workers 2"
restart: always
depends_on:
timescale_db:
condition: service_healthy
env_file: .env
# No host port binding — Coolify's Traefik proxy routes traffic internally.
# Set the webhook domain in Coolify UI pointing to this service on port 8888.
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888/health"]
interval: 30s
timeout: 5s
retries: 3
2026-04-07 18:34:40 +00:00
grafana:
build:
context: ./grafana
dockerfile: Dockerfile
2026-04-07 18:34:40 +00:00
restart: always
depends_on:
timescale_db:
condition: service_healthy
env_file: .env
2026-04-07 18:34:40 +00:00
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
- GF_USERS_DEFAULT_THEME=dark
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards-json/noc_fleet_dashboard.json
2026-04-07 18:34:40 +00:00
volumes:
- grafana-data:/var/lib/grafana
# Provisioning is baked into the image via grafana/Dockerfile — no bind mount needed.
2026-04-07 18:34:40 +00:00
# COOLIFY DOMAIN LOGIC:
# You will set the actual URL in the Coolify UI,
2026-04-07 18:34:40 +00:00
# but the service needs to expose port 3000 internally.
volumes:
timescale-data:
name: timescale-data
grafana-data:
name: grafana-data