diff --git a/docker-compose.coolify.yml b/docker-compose.coolify.yml index 79ad89f..3ab3d7a 100644 --- a/docker-compose.coolify.yml +++ b/docker-compose.coolify.yml @@ -16,11 +16,27 @@ # - `coolify` network is created by Coolify; we attach so containers can # reach the TimescaleDB by service name. +# The TimescaleDB this app talks to lives in another Coolify project +# (its compose network is `bo3nov2ija7g8wn9b1g2paxs`). The DB container +# has the alias `timescale_db` ONLY on that network, so we attach all +# three services to it as an external network — that's what makes the +# DATABASE_URL `postgresql://...@timescale_db:5432/fleet_platform` work. +# +# If/when the DB project is re-created with a different network UUID, +# update the name here OR migrate the DB onto the shared `coolify` net. +networks: + db_project: + name: bo3nov2ija7g8wn9b1g2paxs + external: true + services: gateway: build: . image: fleet-platform:${COOLIFY_RESOURCE_UUID:-latest} restart: unless-stopped + networks: + - default + - db_project environment: APP_ROLE: gateway APP_MODE: prod @@ -49,6 +65,9 @@ services: depends_on: gateway: condition: service_started + networks: + - default + - db_project environment: APP_ROLE: worker APP_MODE: prod @@ -72,6 +91,9 @@ services: depends_on: gateway: condition: service_started + networks: + - default + - db_project environment: APP_ROLE: cron APP_MODE: prod