Claw Stack Manager
Manage the claw Docker stack via Portainer's HTTP API.
Modes
| Mode | What it does | Transition |
|---|---|---|
update | Pull latest image, then trigger stack redeploy | ~20s container transition |
restart | Quick redeploy without pulling | ~20s container transition |
pull-only | Just pull the latest image | No transition |
Usage
# Update: pull new image + restart stack
python3 {{SKILL_DIR}}/scripts/manage.py --mode update
# Restart: just restart without pulling
python3 {{SKILL_DIR}}/scripts/manage.py --mode restart
# Pull: download latest image only
python3 {{SKILL_DIR}}/scripts/manage.py --mode pull-only
How it works
- Adds a unique
REDEPLOY_TSenv var to the stack's compose file - Docker Compose detects the environment change and recreates the container
- Uses
container_name: openclaw-gateway, so there is a brief transition (~20s) - For
--mode update, pulls the image first to minimize total downtime
Requirements
- Portainer API access (set
PORTAINER_API_KEYenv) PORTAINER_URL(default:http://docker.nas.liyj.cn:2082)CLAW_STACK_ID(default:89)PORTAINER_ENDPOINT(default:2)CLAW_IMAGE(default:liyujiang/openclaw:latest)
All configurable via environment variables.