From 66e1d94b819d21f9c6f9dd9308f1502e86b6299d Mon Sep 17 00:00:00 2001 From: kianiadee Date: Wed, 27 May 2026 20:56:04 +0300 Subject: [PATCH] =?UTF-8?q?Coolify=20compose:=20attach=20to=20DB's=20proje?= =?UTF-8?q?ct=20network=20(bo3nov...)=20so=20the=20`timescale=5Fdb`=20alia?= =?UTF-8?q?s=20resolves.=20Without=20this=20the=20new=20app's=20PG=20pool?= =?UTF-8?q?=20times=20out=20=E2=80=94=20DB=20only=20has=20the=20alias=20on?= =?UTF-8?q?=20its=20own=20project=20network,=20not=20on=20`coolify`=20shar?= =?UTF-8?q?ed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.coolify.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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