gabriel / musehub public
fix BREAKING deploy dev
AI Agent gabriel · 51 days ago · Apr 28, 2026 · Diff

fix(deploy): replace direct nginx port-file writes with musehub-set-slot script

Any agent writing to /etc/nginx/musehub-active-port directly must produce valid nginx syntax — a trap that broke staging repeatedly. Fix structurally:

- deploy/set-active-slot.sh: installed as /usr/local/bin/musehub-set-slot on the instance. Accepts only 'blue' or 'green', constructs the correct 'server 127.0.0.1:{port};' directive internally, runs nginx -t before reload. Impossible to produce a bad nginx config via this interface.

- deploy.sh: nginx_point_to now calls musehub-set-slot <slot> instead of writing the port file directly. --init installs the script. sanitize also delegates to musehub-set-slot so recovery is always correct.

- push.sh: syncs set-active-slot.sh to the instance on every deploy, so the script stays current without a separate provisioning step.

Recovery command for any future agent: sudo musehub-set-slot blue (or green)

sha256:ef5614c0cfb6a312635cbf4ca2e4439d1ad7ce211e63761b3b883e527bcab84e sha
sha256:b9912373469448ad826d7023f651212ca2834f2dad197a0c307e5712a1e45705 snapshot
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:ef5614c0cfb6a312635cbf4ca2e4439d1ad7ce211e63761b3b883e527bcab84e --body "your comment"