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 <noreply@anthropic.com>
This commit is contained in:
parent
b0db22c669
commit
98bedaae5f
1 changed files with 10 additions and 7 deletions
|
|
@ -15,11 +15,11 @@ services:
|
||||||
PGRST_DB_MAX_ROWS: "10000"
|
PGRST_DB_MAX_ROWS: "10000"
|
||||||
PGRST_OPENAPI_SERVER_PROXY_URI: ${PGRST_PUBLIC_URL:-http://localhost:3000}
|
PGRST_OPENAPI_SERVER_PROXY_URI: ${PGRST_PUBLIC_URL:-http://localhost:3000}
|
||||||
PGRST_SERVER_CORS_ALLOWED_ORIGINS: ${TRIPS_WEB_URL:-http://localhost:5173}
|
PGRST_SERVER_CORS_ALLOWED_ORIGINS: ${TRIPS_WEB_URL:-http://localhost:5173}
|
||||||
# Local-dev convenience: bind to host port 3000 so the React dev server
|
# Coolify magic: triggers FQDN assignment + Traefik routing to port 3000.
|
||||||
# can hit it without going through Caddy. Coolify deployments should
|
# Set the actual FQDN in the Coolify resource's Domains panel.
|
||||||
# remove this and route via the platform's reverse proxy instead.
|
SERVICE_FQDN_POSTGREST_3000: ${PGRST_PUBLIC_URL}
|
||||||
ports:
|
# No host port binding for Coolify. For local dev, drop a
|
||||||
- "3000:3000"
|
# compose/docker-compose.override.yaml that re-adds: ports: ["3000:3000"].
|
||||||
|
|
||||||
trips_web:
|
trips_web:
|
||||||
build:
|
build:
|
||||||
|
|
@ -31,7 +31,10 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
expose:
|
expose:
|
||||||
- "8080"
|
- "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:
|
depends_on:
|
||||||
- postgrest
|
- postgrest
|
||||||
# No host port binding for production. For local dev, prefer running
|
# For local dev, prefer running `pnpm dev` directly against postgrest.
|
||||||
# `pnpm dev` directly against the postgrest service above.
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue