Skip to content

Commit 81323bb

Browse files
iobrunoclaude
andcommitted
fix/prefect-pgsql-mount: Fix Postgres volume mount and healthcheck
Fix volume mount point from /var/lib/postgresql/data to /var/lib/postgresql and use $$POSTGRES_USER env var in pg_isready healthcheck for both ingest-db and prefect-metastore services. This addresses a breaking change in postgres:18-alpine and later versions introduced by docker-library/postgres#1394. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent adfbd87 commit 81323bb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

module2-workflow-orchestration/prefect/compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ services:
1212
ports:
1313
- '5432:5432'
1414
volumes:
15-
- vol-ingest-db:/var/lib/postgresql/data
15+
- vol-ingest-db:/var/lib/postgresql
1616
healthcheck:
17-
test: ["CMD-SHELL", "pg_isready -U postgres"]
17+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
1818
interval: 5s
1919
timeout: 5s
2020
retries: 5
@@ -30,9 +30,9 @@ services:
3030
ports:
3131
- '5432'
3232
volumes:
33-
- vol-prefect-metastore:/var/lib/postgresql/data
33+
- vol-prefect-metastore:/var/lib/postgresql
3434
healthcheck:
35-
test: ["CMD-SHELL", "pg_isready -U prefect"]
35+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
3636
interval: 5s
3737
timeout: 5s
3838
retries: 5

0 commit comments

Comments
 (0)