fix(opencode): use Basic Auth header for BusyBox healthcheck
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

BusyBox wget rejects --user/--password, so the authenticated probe always failed.

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

View file

@ -243,9 +243,10 @@ services:
ports:
- "4096:4096"
healthcheck:
# BusyBox wget has no --user/--password; use Authorization header.
test:
- CMD-SHELL
- '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'
- 'AUTH=$(printf "%s" "${OPENCODE_SERVER_USERNAME:-opencode}:${OPENCODE_SERVER_PASSWORD}" | base64 | tr -d "\n"); wget -qO- --timeout=3 --header="Authorization: Basic $AUTH" http://127.0.0.1:4096/global/health >/dev/null || exit 1'
interval: 30s
timeout: 10s
retries: 3