Coolify compose: attach gateway to coolify external network
Some checks are pending
build / lint-test (push) Waiting to run
build / build-push (push) Blocked by required conditions

Traefik runs on the `coolify` shared network. Without the gateway also
being on it, Traefik logs "Could not find network 'coolify' for
container, defaulting to first available" and picks an IP on the
project-local network it can't reach → intermittent 504 Gateway Timeout
(30s) in the browser.

Hot-patched the running container via `docker network connect coolify`;
this commit makes the fix permanent so the next Coolify redeploy doesn't
reintroduce the regression.

Worker and cron don't need it — they don't serve external HTTP.
This commit is contained in:
kianiadee 2026-05-27 22:56:31 +03:00
parent 4100002b4e
commit f47d3dc118

View file

@ -28,6 +28,12 @@ networks:
db_project: db_project:
name: bo3nov2ija7g8wn9b1g2paxs name: bo3nov2ija7g8wn9b1g2paxs
external: true external: true
# Traefik runs on `coolify`. The gateway must join it so Host(`api.rahamafresh.com`)
# actually resolves to a reachable IP; without it Traefik picks the wrong
# interface and times out at 30s → intermittent 504s in the browser.
coolify_shared:
name: coolify
external: true
services: services:
gateway: gateway:
@ -37,6 +43,7 @@ services:
networks: networks:
- default - default
- db_project - db_project
- coolify_shared
environment: environment:
APP_ROLE: gateway APP_ROLE: gateway
APP_MODE: prod APP_MODE: prod