fix(opencode): escape healthcheck shell vars for Compose
Compose was interpolating $AUTH at parse time, breaking the BusyBox probe. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
15cd1f55b4
commit
74f1e9eb0b
1 changed files with 2 additions and 1 deletions
|
|
@ -244,9 +244,10 @@ services:
|
||||||
- "4096:4096"
|
- "4096:4096"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
# BusyBox wget has no --user/--password; use Authorization header.
|
# BusyBox wget has no --user/--password; use Authorization header.
|
||||||
|
# $$ escapes so Compose does not interpolate AUTH at parse time.
|
||||||
test:
|
test:
|
||||||
- CMD-SHELL
|
- CMD-SHELL
|
||||||
- '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'
|
- '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
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue