fix: improve PostgreSQL health checks and expose port 5432
- Add explicit expose directive for port 5432 on both postgres containers - Improve health check to test specific database and user - Should help with database connection issues
This commit is contained in:
parent
5262e73a12
commit
183636bceb
@ -22,8 +22,10 @@ services:
|
|||||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- placebo-postgres-backend-data:/var/lib/postgresql/data
|
- placebo-postgres-backend-data:/var/lib/postgresql/data
|
||||||
|
expose:
|
||||||
|
- "5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready']
|
test: ['CMD-SHELL', 'pg_isready -U placebo_user -d placebo_backend_db']
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
@ -41,8 +43,10 @@ services:
|
|||||||
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- placebo-postgres-cms-data:/var/lib/postgresql/data
|
- placebo-postgres-cms-data:/var/lib/postgresql/data
|
||||||
|
expose:
|
||||||
|
- "5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', 'pg_isready']
|
test: ['CMD-SHELL', 'pg_isready -U placebo_user -d placebo_cms_db']
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user