From d868499b428234c723472d1f41104836beeea335 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 7 Jun 2026 09:48:09 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20healthcheck=20uses=20credentials=20?= =?UTF-8?q?=E2=80=94=20container=20was=20marked=20unhealthy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /_up returns 401 when require_valid_user = true, so curl -f always failed, Docker marked the container unhealthy, and Traefik refused to route traffic to it (causing the 404 on couchdb.manohargupta.com). Switch to CMD-SHELL so the shell can expand $COUCHDB_USER / $COUCHDB_PASSWORD from the container's environment at runtime. Co-Authored-By: Claude Sonnet 4.6 --- obsidian-sync/docker-compose.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/obsidian-sync/docker-compose.yml b/obsidian-sync/docker-compose.yml index 591697f..435fc93 100644 --- a/obsidian-sync/docker-compose.yml +++ b/obsidian-sync/docker-compose.yml @@ -34,8 +34,10 @@ services: # docker inspect shows OOMKilled:false — misleading). Re-add once swap < 50%. healthcheck: - # _up is CouchDB's lightweight liveness endpoint (no auth needed). - test: ["CMD", "curl", "-f", "http://localhost:5984/_up"] + # _up requires auth because require_valid_user = true covers all endpoints. + # CMD-SHELL lets the container shell expand $COUCHDB_USER/$COUCHDB_PASSWORD + # (the $$ in YAML becomes $ after Compose substitution, then the shell runs it). + test: ["CMD-SHELL", "curl -f -u $$COUCHDB_USER:$$COUCHDB_PASSWORD http://localhost:5984/_up"] interval: 30s timeout: 10s retries: 5