fix(opencode): authenticate healthcheck against basic-auth server
Some checks are pending
CI / Lint, type-check, test (push) Waiting to run
Deploy homelab (CT 116) / Deploy to CT 116 (push) Waiting to run

Password-protected OpenCode returns 401 on /global/health without
credentials, which marked the container unhealthy despite a live server.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Randall Stillwell 2026-09-12 16:27:43 -05:00
parent ff3bf83afe
commit af676faa97

View file

@ -245,7 +245,7 @@ services:
healthcheck:
test:
- CMD-SHELL
- "wget -qO- --timeout=3 http://127.0.0.1:4096/global/health >/dev/null || curl -fsS http://127.0.0.1:4096/global/health >/dev/null || exit 1"
- 'wget -qO- --timeout=3 --user="${OPENCODE_SERVER_USERNAME:-opencode}" --password="${OPENCODE_SERVER_PASSWORD}" http://127.0.0.1:4096/global/health >/dev/null || exit 1'
interval: 30s
timeout: 10s
retries: 3