fix(infra): mount Postgres 18+ canon (/var/lib/postgresql)
Postgres 18 mudou o layout do mount canônico — dados ficam em subdir por major-version (18/main) pra suportar pg_upgrade --link sem boundary issues. Ref: docker-library/postgres#1259. Antes: container subia em loop com "in 18+, these Docker images are configured to store database data in a format compatible with pg_ctlcluster" e "there appears to be PostgreSQL data in: /var/lib/postgresql/data (unused mount/volume)". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,10 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '5432:5432'
|
- '5432:5432'
|
||||||
volumes:
|
volumes:
|
||||||
- sar-postgres-data:/var/lib/postgresql/data
|
# Postgres 18+ usa /var/lib/postgresql (sem /data) — dados ficam em
|
||||||
|
# subdir por major-version pra suportar pg_upgrade --link sem
|
||||||
|
# boundary issues. Ref: docker-library/postgres#1259.
|
||||||
|
- sar-postgres-data:/var/lib/postgresql
|
||||||
- ./scripts/postgres-init:/docker-entrypoint-initdb.d:ro
|
- ./scripts/postgres-init:/docker-entrypoint-initdb.d:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready -U sar -d sar_master']
|
test: ['CMD-SHELL', 'pg_isready -U sar -d sar_master']
|
||||||
|
|||||||
Reference in New Issue
Block a user