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)
0 comments
muse hub commit comment sha256:ef5614c0cfb6a312635cbf4ca2e4439d1ad7ce211e63761b3b883e527bcab84e --body "your comment"
No comments yet. Be the first to start the discussion.