This skill should be used when deploying containerized applications to remote servers. It builds Docker images, pushes to GHCR, and deploys via SSH with health verification.
From soleurnpx claudepluginhub jikig-ai/soleur --plugin soleurThis skill uses the workspace's default tool permissions.
references/hetzner-setup.mdscripts/deploy.shDeploy a containerized application to a remote server via Docker and SSH.
| Variable | Required | Description | Example |
|---|---|---|---|
DEPLOY_HOST | Yes | SSH target (user@host) | root@203.0.113.10 |
DEPLOY_IMAGE | Yes | GHCR image path | ghcr.io/org/app |
DEPLOY_HEALTH_URL | No | Health check endpoint | http://203.0.113.10:3000/health |
DEPLOY_CONTAINER | No | Container name (default: image basename) | myapp |
DEPLOY_DOCKERFILE | No | Dockerfile path (default: ./Dockerfile) | ./docker/Dockerfile.prod |
For first-time server setup, see hetzner-setup.md.
Check prerequisites before starting the build.
Run these checks as separate Bash commands:
DEPLOY_HOST is set: printenv DEPLOY_HOST (must produce output)DEPLOY_IMAGE is set: printenv DEPLOY_IMAGE (must produce output)docker info > /dev/null 2>&1ssh -o ConnectTimeout=5 -o BatchMode=yes <deploy-host> "echo OK" (replace <deploy-host> with the actual DEPLOY_HOST value)test -f ./Dockerfile (or the DEPLOY_DOCKERFILE path if set)If any check fails, stop and report the error. Do not proceed to Phase 1.
Show the deployment summary and ask for confirmation.
Use the AskUserQuestion tool to present:
Question: "Deploy this configuration?"
Options:
Display before asking:
Deployment Plan
Image: <DEPLOY_IMAGE>:<git-short-sha>
Target: <DEPLOY_HOST>
Container: <DEPLOY_CONTAINER or image basename>
Dockerfile: <DEPLOY_DOCKERFILE or ./Dockerfile>
Health URL: <DEPLOY_HEALTH_URL or none>
Resolve <git-short-sha> by running git rev-parse --short HEAD.
If the user selects Cancel, stop execution.
Run deploy.sh to build, push, and deploy:
bash ./plugins/soleur/skills/deploy/scripts/deploy.sh
The script handles:
:latestAfter deployment completes, verify the service is running.
If DEPLOY_HEALTH_URL is set:
The deploy script runs a health check (5 attempts, 3s apart).
If the health check fails:
Health check failed. Debug with:
ssh <DEPLOY_HOST> "docker logs <container-name> --tail 50"
If DEPLOY_HEALTH_URL is not set:
Report deployment as complete without health verification:
Deployed <git-short-sha> to <DEPLOY_HOST>
No health URL configured -- skipping verification.
set -euo pipefail -- any command failure aborts the deployment.docker restart, to ensure the new image is used.