feat(agent): add health check endpoint and Docker HEALTHCHECK
Migrate from Microsoft.NET.Sdk.Worker to Microsoft.NET.Sdk.Web to enable HTTP health checks. Add /healthz endpoint via AgentHealthCheck (reports healthy when registered with Central). Configure Docker HEALTHCHECK with 30s interval and 15s start period.
This commit is contained in:
1 parent
eafbab5e7a
commit
58f46fe3dd
5 files changed
+66
-8
No files matched your search
@@ -115,6 +115,12 @@ services:
|
||||
HEIMDALL_CENTRAL_URL: ${HEIMDALL_CENTRAL_URL:-http://heimdall-central:8080}
|
||||
HEIMDALL_SITE_TOKEN: ${HEIMDALL_SITE_TOKEN}
|
||||
HEIMDALL_AGENT_NAME: ${HEIMDALL_AGENT_NAME:-agent-01}
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
depends_on:
|
||||
- heimdall-central
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in new issue
Block a user