From 98bedaae5f3143d34bb25545764f046b220394dc Mon Sep 17 00:00:00 2001 From: David Kiania Date: Sat, 2 May 2026 11:22:08 +0300 Subject: [PATCH] fix(compose): drop host port binding, add Coolify FQDN hints for Traefik Removes the postgrest host port (3000:3000) that the README already flagged as local-dev-only. Adds SERVICE_FQDN_POSTGREST_3000 / SERVICE_FQDN_TRIPS_WEB_8080 environment hints so Coolify auto-wires Traefik routing to the correct container ports when this stack is deployed as a Docker Compose resource. Local dev: re-add ports via a gitignored compose/docker-compose.override.yaml. Co-Authored-By: Claude Opus 4.7 --- compose/docker-compose.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/compose/docker-compose.yaml b/compose/docker-compose.yaml index c061481..c124fc3 100644 --- a/compose/docker-compose.yaml +++ b/compose/docker-compose.yaml @@ -15,11 +15,11 @@ services: PGRST_DB_MAX_ROWS: "10000" PGRST_OPENAPI_SERVER_PROXY_URI: ${PGRST_PUBLIC_URL:-http://localhost:3000} PGRST_SERVER_CORS_ALLOWED_ORIGINS: ${TRIPS_WEB_URL:-http://localhost:5173} - # Local-dev convenience: bind to host port 3000 so the React dev server - # can hit it without going through Caddy. Coolify deployments should - # remove this and route via the platform's reverse proxy instead. - ports: - - "3000:3000" + # Coolify magic: triggers FQDN assignment + Traefik routing to port 3000. + # Set the actual FQDN in the Coolify resource's Domains panel. + SERVICE_FQDN_POSTGREST_3000: ${PGRST_PUBLIC_URL} + # No host port binding for Coolify. For local dev, drop a + # compose/docker-compose.override.yaml that re-adds: ports: ["3000:3000"]. trips_web: build: @@ -31,7 +31,10 @@ services: restart: always expose: - "8080" + environment: + # Coolify magic: triggers FQDN assignment + Traefik routing to port 8080. + # Set the actual FQDN in the Coolify resource's Domains panel. + SERVICE_FQDN_TRIPS_WEB_8080: ${TRIPS_WEB_URL} depends_on: - postgrest - # No host port binding for production. For local dev, prefer running - # `pnpm dev` directly against the postgrest service above. + # For local dev, prefer running `pnpm dev` directly against postgrest.