From 5a44afe86ec30074581c65049ee17edd8b2981c2 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 8 Oct 2026 20:36:25 -0400 Subject: [PATCH] chore(compose): no healthcheck on the database (#5275) #5275 "steward_db killed by its healthcheck twice": on NFS, pg_isready timed out during slow writes and the orchestrator killed a healthy database. The operator removed it from the live stack and ruled that Steward doesn't ship one. Steward waits for the database itself (60 s at startup, retries per request), so depends_on needs no health condition. Co-Authored-By: Claude Opus 5.5 --- compose.deploy.yml | 11 ++++------- docker-compose.yml | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/compose.deploy.yml b/compose.deploy.yml index c5bd8fb..3aa9050 100644 --- a/compose.deploy.yml +++ b/compose.deploy.yml @@ -39,8 +39,7 @@ services: # mount, pin STEWARD_SECRET_KEY (env or a docker secret) instead, so the key # never depends on filesystem ownership being correct on every node. depends_on: - db: - condition: service_healthy + - db restart: unless-stopped db: @@ -54,11 +53,9 @@ services: volumes: - pgdata:/var/lib/postgresql/data # No host port published — db is reachable only on the backend network. - healthcheck: - test: ["CMD-SHELL", "pg_isready -U steward"] - interval: 5s - timeout: 5s - retries: 5 + # No healthcheck: a slow disk (NFS) failed pg_isready and the orchestrator + # killed a healthy database mid-write (#5275). Steward waits for the + # database itself, at startup and per request (steward/database.py). restart: unless-stopped networks: diff --git a/docker-compose.yml b/docker-compose.yml index 9f7cf81..4a3c6ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,8 +27,7 @@ services: - STEWARD_SECRET_KEY=dev-secret-key-change-me - PYTHONPATH=/app depends_on: - db: - condition: service_healthy + - db restart: unless-stopped db: @@ -42,11 +41,9 @@ services: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data - healthcheck: - test: ["CMD-SHELL", "pg_isready -U steward"] - interval: 5s - timeout: 5s - retries: 5 + # No healthcheck: a slow disk (NFS) failed pg_isready and the orchestrator + # killed a healthy database mid-write (#5275). Steward waits for the + # database itself, at startup and per request (steward/database.py). restart: unless-stopped volumes: