Skip to content

Commit 85431c0

Browse files
iobrunoclaude
andcommitted
fix/conduktor-pgsql: Fix Postgres mount point and healthcheck in compose files
Change volume mount from /var/lib/postgresql/data to /var/lib/postgresql and use $$POSTGRES_USER env var in pg_isready healthcheck instead of hardcoded username across all compose files. Fix for postgres:18-alpine and later versions since docker-library/postgres#1394 Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent adfbd87 commit 85431c0

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

module6-stream-processing/compose.kraft-multi-broker.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ services:
223223
ports:
224224
- '5432'
225225
volumes:
226-
- vol-conduktor-metastore:/var/lib/postgresql/data
226+
- vol-conduktor-metastore:/var/lib/postgresql
227227
healthcheck:
228-
test: ["CMD-SHELL", "pg_isready -U postgres"]
228+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
229229
interval: 5s
230230
timeout: 5s
231231
retries: 5
@@ -243,9 +243,9 @@ services:
243243
ports:
244244
- '5432'
245245
volumes:
246-
- vol-conduktor-sql:/var/lib/postgresql/data
246+
- vol-conduktor-sql:/var/lib/postgresql
247247
healthcheck:
248-
test: ["CMD-SHELL", "pg_isready -U postgres"]
248+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
249249
interval: 5s
250250
timeout: 5s
251251
retries: 5

module6-stream-processing/compose.kraft-single-broker.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ services:
187187
ports:
188188
- '5432'
189189
volumes:
190-
- vol-conduktor-metastore:/var/lib/postgresql/data
190+
- vol-conduktor-metastore:/var/lib/postgresql
191191
healthcheck:
192-
test: ["CMD-SHELL", "pg_isready -U postgres"]
192+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
193193
interval: 5s
194194
timeout: 5s
195195
retries: 5
@@ -207,9 +207,9 @@ services:
207207
ports:
208208
- '5432'
209209
volumes:
210-
- vol-conduktor-sql:/var/lib/postgresql/data
210+
- vol-conduktor-sql:/var/lib/postgresql
211211
healthcheck:
212-
test: ["CMD-SHELL", "pg_isready -U postgres"]
212+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
213213
interval: 5s
214214
timeout: 5s
215215
retries: 5

module6-stream-processing/compose.redpanda.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ services:
6969
ports:
7070
- '5432'
7171
volumes:
72-
- vol-conduktor-metastore:/var/lib/postgresql/data
72+
- vol-conduktor-metastore:/var/lib/postgresql
7373
healthcheck:
74-
test: ["CMD-SHELL", "pg_isready -U postgres"]
74+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
7575
interval: 5s
7676
timeout: 5s
7777
retries: 5
@@ -89,9 +89,9 @@ services:
8989
ports:
9090
- '5432'
9191
volumes:
92-
- vol-conduktor-sql:/var/lib/postgresql/data
92+
- vol-conduktor-sql:/var/lib/postgresql
9393
healthcheck:
94-
test: ["CMD-SHELL", "pg_isready -U postgres"]
94+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
9595
interval: 5s
9696
timeout: 5s
9797
retries: 5

module6-stream-processing/compose.zookeeper-multi-broker.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ services:
244244
ports:
245245
- '5432'
246246
volumes:
247-
- vol-conduktor-metastore:/var/lib/postgresql/data
247+
- vol-conduktor-metastore:/var/lib/postgresql
248248
healthcheck:
249-
test: ["CMD-SHELL", "pg_isready -U postgres"]
249+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
250250
interval: 5s
251251
timeout: 5s
252252
retries: 5
@@ -264,9 +264,9 @@ services:
264264
ports:
265265
- '5432'
266266
volumes:
267-
- vol-conduktor-sql:/var/lib/postgresql/data
267+
- vol-conduktor-sql:/var/lib/postgresql
268268
healthcheck:
269-
test: ["CMD-SHELL", "pg_isready -U postgres"]
269+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
270270
interval: 5s
271271
timeout: 5s
272272
retries: 5

0 commit comments

Comments
 (0)