diff --git a/docker-compose.yaml b/docker-compose.yaml index e042368..b279e0e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -14,48 +14,37 @@ services: timeout: 5s retries: 5 - db_migrate: - build: - context: . - dockerfile: Dockerfile - command: python run_migrations.py - depends_on: - timescale_db: - condition: service_healthy - env_file: .env - restart: "no" - ingest_movement: build: context: . dockerfile: Dockerfile - command: python ingest_movement_rev.py + command: sh -c "python run_migrations.py && python ingest_movement_rev.py" restart: always depends_on: - db_migrate: - condition: service_completed_successfully + timescale_db: + condition: service_healthy env_file: .env ingest_events: build: context: . dockerfile: Dockerfile - command: python ingest_events_rev.py + command: sh -c "python run_migrations.py && python ingest_events_rev.py" restart: always depends_on: - db_migrate: - condition: service_completed_successfully + timescale_db: + condition: service_healthy env_file: .env webhook_receiver: build: context: . dockerfile: Dockerfile - command: uvicorn webhook_receiver_rev:app --host 0.0.0.0 --port 8000 --workers 2 + command: sh -c "python run_migrations.py && uvicorn webhook_receiver_rev:app --host 0.0.0.0 --port 8000 --workers 2" restart: always depends_on: - db_migrate: - condition: service_completed_successfully + 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 8000. @@ -69,8 +58,8 @@ services: image: grafana/grafana:11.0.0 restart: always depends_on: - db_migrate: - condition: service_completed_successfully + timescale_db: + condition: service_healthy environment: - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD} volumes: