Coolify compose: attach to DB's project network (bo3nov...) so the
Some checks are pending
build / lint-test (push) Waiting to run
build / build-push (push) Blocked by required conditions

`timescale_db` alias resolves. Without this the new app's PG pool
times out — DB only has the alias on its own project network, not on
`coolify` shared.
This commit is contained in:
kianiadee 2026-05-27 20:56:04 +03:00
parent 0a47d738c4
commit 66e1d94b81

View file

@ -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