cert fix
This commit is contained in:
20
.serena/memories/postgres_healthcheck_fix.md
Normal file
20
.serena/memories/postgres_healthcheck_fix.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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.
|
||||
@@ -13,8 +13,7 @@ services:
|
||||
- --providers.docker.exposedbydefault=false
|
||||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
|
||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
||||
- --certificatesresolvers.letsencrypt.acme.tlschallenge=true
|
||||
- --certificatesresolvers.letsencrypt.acme.email=${ACME_EMAIL:-admin@example.com}
|
||||
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
|
||||
- --log.level=INFO
|
||||
@@ -85,8 +84,10 @@ services:
|
||||
- "traefik.http.routers.quixotic-http.middlewares=redirect-to-https"
|
||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||
depends_on:
|
||||
- traefik
|
||||
- postgres
|
||||
traefik:
|
||||
condition: service_started
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- quixotic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user