cc: gate on DB readiness + real healthchecks (start.sh has no set -e and wait-for-it passes mid-initdb)
- database: pg_isready healthcheck; calcom depends_on service_healthy - calcom: healthcheck probes /auth/login with redirects (upstream wget --spider / fails on 307)
This commit is contained in:
@@ -25,6 +25,13 @@ services:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
healthcheck:
|
||||
# start.sh's wait-for-it passes as soon as the port OPENS (mid-initdb) and
|
||||
# prisma migrate then P1001s; the CC stack gates on a real readiness check.
|
||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
@@ -34,6 +41,16 @@ services:
|
||||
environment:
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}
|
||||
DATABASE_DIRECT_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy # start.sh has no `set -e`; gate so its migrate step actually sees a ready DB
|
||||
healthcheck:
|
||||
# upstream image healthcheck uses `wget --spider /` which fails on the
|
||||
# / -> /auth/login 307; probe the login page with redirects instead.
|
||||
test: ["CMD-SHELL", "wget -qO- --max-redirect=5 http://127.0.0.1:3000/auth/login >/dev/null || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
calcom-api:
|
||||
profiles: ["off"] # v2 API — add with `--profile api` when needed
|
||||
|
||||
Reference in New Issue
Block a user