fix(deploy): configurable postgres host port (avoid 5432 conflict)
fr2-postgres failed to start after another local project's postgres grabbed host
port 5432 during downtime. The internal stack always connects via postgres:5432 on
the docker network, so the published host port is only for external tooling — make
it ${PG_HOST_PORT:-5532} to avoid the clash. (Also recovered from a stale bind-mount
where scripts/init-db.sh had become a directory; current compose mounts
deploy/postgres-initdb/.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,9 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
# HOST_BIND=127.0.0.1 in prod keeps these off the public interface (only
|
# HOST_BIND=127.0.0.1 in prod keeps these off the public interface (only
|
||||||
# Caddy's 80/443 face the internet). Unset → 0.0.0.0 for local/LAN dev.
|
# Caddy's 80/443 face the internet). Unset → 0.0.0.0 for local/LAN dev.
|
||||||
- "${HOST_BIND:-0.0.0.0}:5432:5432"
|
# Host port is configurable (PG_HOST_PORT) — 5432 is often taken by another
|
||||||
|
# local project's postgres; the internal stack always uses postgres:5432.
|
||||||
|
- "${HOST_BIND:-0.0.0.0}:${PG_HOST_PORT:-5532}:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d flatrender"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d flatrender"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
|||||||
Reference in New Issue
Block a user