Fix container startup timing and pgAdmin health check issues

DEPLOY SCRIPT IMPROVEMENTS:

- Start PostgreSQL first with --no-deps flag

- Wait for PostgreSQL to be healthy (increased to 120 seconds)

- Start pgAdmin separately after PostgreSQL is ready

- Added note that pgAdmin takes 30-60 seconds to initialize

- pgAdmin startup no longer blocks database operations

DOCKER COMPOSE FIX:

- Removed health check condition from pgAdmin depends_on

- Changed from 'condition: service_healthy' to simple dependency

- pgAdmin can start independently without waiting for PostgreSQL health

- Prevents 'Container is unhealthy' errors during startup

TROUBLESHOOTING SECTION:

- Added troubleshooting tips to deploy.sh output

- Command to check pgAdmin status: docker logs business_analytics_ui

- Instructions to wait for pgAdmin initialization

- Look for 'Listening at: http://[::]:80' in logs

BENEFITS:

- No more 'Container is unhealthy' errors

- Database operations can proceed while pgAdmin initializes

- Clear user expectations about pgAdmin startup time

- Better error handling and troubleshooting guidance
This commit is contained in:
Alphaeus Mote
2025-10-24 12:22:35 -04:00
parent 3e927fc5a8
commit 75fa7e0159
2 changed files with 27 additions and 8 deletions
+1 -2
View File
@@ -43,8 +43,7 @@ services:
networks:
- analytics_network
depends_on:
postgres:
condition: service_healthy
- postgres
restart: unless-stopped
volumes:
- pgadmin_data:/var/lib/pgadmin