fix(ci): restart Caddy after web deploy to fix stale bind mount#68
Conversation
The scp-action with rm:true deletes and recreates /opt/cipherbox/web, changing the directory inode. Caddy's bind mount still references the old inode, causing it to serve 404s. Restarting Caddy after deploy ensures it picks up the new mount. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughA new step is added to the staging deployment workflow to restart the Caddy container after starting Docker services, with comments explaining the purpose of refreshing the bind mount host directory and preventing inode breakage. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the staging deployment workflow to restart the caddy service after redeploying the web app files, preventing stale bind mounts when the target directory is deleted/recreated by scp-action (rm: true).
Changes:
- Restart
caddyafterdocker compose up -dduring staging deploys to ensure/opt/cipherbox/webbind mount reflects the refreshed directory inode.
Summary
scp-actionwithrm: truedeletes and recreates/opt/cipherbox/web, changing the directory inodedocker compose restart caddyafterup -densures it picks up the new mountTest plan
v*-staging*tag and verify the web app loads after deploy/srv/webwithout manual intervention🤖 Generated with Claude Code
Summary by CodeRabbit