feat(goclaw): pass through auto-upgrade and MiniMax env, add healthcheck

This commit is contained in:
tiennm99 committed 2026-10-04 21:42:01 +07:00
1 parent a0b5e15d9d
commit acb3628dc8
3 files changed
+37 -3

No files matched your search

+9
View File
@@ -18,5 +18,14 @@ POSTGRES_USER=goclaw
POSTGRES_PASSWORD=goclaw
POSTGRES_DB=goclaw
# Apply schema migrations and data hooks on startup.
GOCLAW_AUTO_UPGRADE=true
# MiniMax keys, for the MiniMax LLM provider and text-to-speech. Leave empty
# when MiniMax is not used.
GOCLAW_MINIMAX_API_KEY=
GOCLAW_TTS_MINIMAX_API_KEY=
GOCLAW_TTS_MINIMAX_GROUP_ID=
# Set to 1 to log full LLM request and response bodies.
GOCLAW_TRACE_VERBOSE=0
+18 -3
View File
@@ -20,7 +20,9 @@ sessions, encrypted provider keys and the semantic memory.
2. Map the domain to port `18790` and deploy. Migrations run on start.
3. Open the domain and use the setup wizard to add an LLM provider key.
Health check: `GET /health`.
Health check: `GET /health`, which the `goclaw` container also polls as its
compose healthcheck so Coolify can report it healthy. The first check waits 60
seconds, to leave time for migrations on start.
## Authentication
@@ -44,16 +46,29 @@ itself is not used here.
| `GOCLAW_GATEWAY_TOKEN` | — | Bearer token for the API and dashboard |
| `GOCLAW_ENCRYPTION_KEY` | — | AES-256-GCM key for stored provider keys |
| `POSTGRES_USER` / `POSTGRES_PASSWORD` / `POSTGRES_DB` | `goclaw` | Database credentials, read by both containers |
| `GOCLAW_AUTO_UPGRADE` | `true` | Apply schema migrations and data hooks on startup |
| `GOCLAW_MINIMAX_API_KEY` | empty | MiniMax LLM provider key |
| `GOCLAW_TTS_MINIMAX_API_KEY` / `GOCLAW_TTS_MINIMAX_GROUP_ID` | empty | MiniMax text-to-speech credentials |
| `GOCLAW_TRACE_VERBOSE` | `0` | Log full LLM request and response bodies |
`GOCLAW_AUTO_UPGRADE` defaults to `true`, the value upstream recommends for
Docker. The image entrypoint already runs `goclaw upgrade` before `serve`, but
it only logs a warning when that fails. With the variable set, `serve` applies
any pending migrations itself rather than stopping on a schema check.
The MiniMax variables are the one case where a provider key comes from the
environment rather than the dashboard: GoClaw reads them directly for the
MiniMax provider and its text-to-speech. Leave them empty when MiniMax is not
used.
`GOCLAW_HOST`, `GOCLAW_PORT`, `GOCLAW_CONFIG` and `GOCLAW_SKILLS_DIR` are set
in `compose.yml` rather than here — they are properties of this layout, not of
whoever deploys it. The two paths override image defaults that point outside
any volume (`/app/config.json`, `/app/skills`), which would drop the
configuration and every installed skill on redeploy.
Provider API keys are not variables: they are entered in the dashboard and
stored encrypted in PostgreSQL.
Other provider API keys are not variables: they are entered in the dashboard
and stored encrypted in PostgreSQL.
## Storage
+10
View File
@@ -13,6 +13,10 @@ services:
- GOCLAW_PORT=18790
- GOCLAW_CONFIG=/app/data/config.json
- GOCLAW_SKILLS_DIR=/app/data/skills
- GOCLAW_AUTO_UPGRADE=${GOCLAW_AUTO_UPGRADE:-true}
- GOCLAW_MINIMAX_API_KEY=${GOCLAW_MINIMAX_API_KEY:-}
- GOCLAW_TTS_MINIMAX_API_KEY=${GOCLAW_TTS_MINIMAX_API_KEY:-}
- GOCLAW_TTS_MINIMAX_GROUP_ID=${GOCLAW_TTS_MINIMAX_GROUP_ID:-}
- GOCLAW_TRACE_VERBOSE=${GOCLAW_TRACE_VERBOSE:-0}
volumes:
- goclaw-data:/app/data
@@ -20,6 +24,12 @@ services:
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:18790/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
extra_hosts:
- host.docker.internal:host-gateway
init: true