plan/14-deploy.md: git pull main + hard restart (compose down -> build-stack.sh --up online), drasl/online, verify + rollback. .claude/skills/deploy: skill to run it (pre-check, pull, hard restart, verify) with prod guardrails. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.1 KiB
3.1 KiB
Deployment — redeploy to cochi
Production host for the Ulicraft stack.
| Host | cochi (SSH alias) |
| Path | /home/ubuntu/mc/ulicraft-server-v1 |
| Branch | main |
| Run mode | online (compose files: docker-compose.yml + docker-compose.static.yml) |
| Auth | Drasl (base stack — no Blessing Skin override) |
| Restart | hard (compose down → build-stack.sh --up) — brief full downtime |
Routine redeploy
ssh cochi
cd /home/ubuntu/mc/ulicraft-server-v1
git pull --ff-only
# hard restart: tear the stack down, then bring it back up (renders configs first)
docker compose -f docker-compose.yml -f docker-compose.static.yml down --remove-orphans
tooling/build-stack.sh --up online
Or as a one-shot from your workstation:
ssh cochi 'set -e
cd /home/ubuntu/mc/ulicraft-server-v1
git pull --ff-only
docker compose -f docker-compose.yml -f docker-compose.static.yml down --remove-orphans
tooling/build-stack.sh --up online'
build-stack.sh --up online runs preflight (checks .env), render-config.sh
(which renders configs + render-pack.sh for the packwiz pack), then
docker compose ... up -d with the online file set.
What survives a hard restart
Named volumes persist — world and auth data are safe:
mc_data— world + installed NeoForge/modsdrasl_state— Drasl accounts/skinsbackups/— mc-backup snapshots
down removes containers, not volumes. Players are disconnected during the
restart (a few minutes); they reconnect once minecraft is healthy again.
Prerequisites (one-time, on cochi)
- SSH access as the
cochialias. .envpresent and complete:BASE_DOMAIN,HOST_LAN_IP,RCON_PASSWORD(render-config.shhalts on any unset var, even in online mode).- Docker + compose plugin,
packwiz,envsubst,git. - First deploy only — heavy online prep (fetch launcher, pre-bake the server
volume, etc.):
Not needed for routine redeploys;
tooling/build-stack.sh --prep--upalone re-syncs the pack and configs.
Verify
docker compose -f docker-compose.yml -f docker-compose.static.yml ps
docker compose -f docker-compose.yml -f docker-compose.static.yml logs -f minecraft # watch for "Done"
curl -fsS "http://auth.$(grep '^BASE_DOMAIN=' .env | cut -d= -f2)/" >/dev/null && echo "auth ok"
Rollback
git log --oneline -5 # find the last-good commit
git checkout <sha> # or: git reset --hard <sha>
docker compose -f docker-compose.yml -f docker-compose.static.yml down --remove-orphans
tooling/build-stack.sh --up online
Notes
- Online mode needs internet on
cochiat restart (no air-gap mirror): the server installs NeoForge + mods over the network. For an internet-less deploy, switch toairgap(needs--prepfirst) — seeplan/13-dns-and-run-modes.md. - Switching to the Blessing Skin auth variant changes the file set to
-f docker-compose.yml -f docker-compose.blessingskin.yml(seeplan/03b-blessing-skin.md); update thedown/upcommands accordingly.