20 lines
458 B
Markdown
20 lines
458 B
Markdown
# PostgreSQL Connection Fix
|
|
|
|
## Problem
|
|
App was trying to connect to PostgreSQL before it was ready, causing ECONNREFUSED errors.
|
|
|
|
## Solution
|
|
Modified docker-compose.yml to use proper depends_on with condition:
|
|
|
|
```yaml
|
|
depends_on:
|
|
traefik:
|
|
condition: service_started
|
|
postgres:
|
|
condition: service_healthy
|
|
```
|
|
|
|
This ensures the app waits for PostgreSQL healthcheck to pass before starting.
|
|
|
|
## Status
|
|
Fixed - ready for production deployment test. |