You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Dockerfile uses netclawd directly as PID 1 (ENTRYPOINT ["/usr/local/bin/netclawd"]). This causes the container to exit whenever the daemon restarts — which happens during:
netclaw init wizard's health check step (sends POST /api/lifecycle/shutdown?reason=config-update)
Configuration changes that trigger a daemon restart
Any graceful shutdown/restart cycle
This makes it impossible to run the init wizard via docker exec — the wizard kills the daemon at step 10, the container exits, and the interactive session is lost.
Solution
1. Wrapper entrypoint script
Replace the direct netclawd entrypoint with a bash wrapper that restarts the daemon when it exits:
--start-period=30s: Grace period for initial boot (skill sync, migrations, etc.)
--retries=3 at --interval=15s: ~45 seconds of sustained failure before marking unhealthy — enough to ride out a normal config-triggered restart (5-10 seconds)
Context
The Dockerfile uses
netclawddirectly as PID 1 (ENTRYPOINT ["/usr/local/bin/netclawd"]). This causes the container to exit whenever the daemon restarts — which happens during:netclaw initwizard's health check step (sendsPOST /api/lifecycle/shutdown?reason=config-update)This makes it impossible to run the init wizard via
docker exec— the wizard kills the daemon at step 10, the container exits, and the interactive session is lost.Solution
1. Wrapper entrypoint script
Replace the direct
netclawdentrypoint with a bash wrapper that restarts the daemon when it exits:SIGTERM/SIGINTare forwarded to the daemon sodocker stopworks cleanlydocker execsessions2. Docker HEALTHCHECK
Add a
HEALTHCHECKinstruction using the existing liveness endpoint:--start-period=30s: Grace period for initial boot (skill sync, migrations, etc.)--retries=3at--interval=15s: ~45 seconds of sustained failure before marking unhealthy — enough to ride out a normal config-triggered restart (5-10 seconds)/api/health/ready(simple liveness). Will switch to/api/health/statusonce Health status endpoint should return 503 on sustained connector/provider failures #744 adds meaningful HTTP status codes.Key Files
docker/Dockerfile— entrypoint and HEALTHCHECK changesdocker/entrypoint.sh— new wrapper scriptRelated
/api/health/status(future improvement)