Repository navigation
fix(deploy): run site deploys as tfmc through psdeploy - #243
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
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 |
d77a728 to
0c04c62
Compare
0c04c62 to
ecb90b6
Compare
bffe088 to
ca64140
Compare
The Deploy workflow logged in as ryan and site-deploy worked through ryan's bindfs views of tfmc's checkouts, which made git write files as 660 (hence the chmod loop) and tied deploys to one person's account. - The deploy key logs in as psdeploy, pinned to site-deploy-ssh, which runs a root-owned /usr/local/sbin/site-deploy as tfmc through sudo. - site-deploy works on /home/tfmc directly, calls ps-compose without sudo, sets umask 022 and drops the chmod loop. - The preview key keeps its own forced command, so it still cannot deploy a site. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ca64140 to
20f0720
Compare
|
Reviewed by Muse (muse-wonder-full): VERDICT: OK; its small suggestions are applied. CodeRabbit was rate-limited. The host is prepared: the scripts are installed from this head, the sudoers rules are in place, the deploy key is on psdeploy, and a simulated forced command as psdeploy returned 'already deployed'. The frontend test failure was a flaky ProfileCustomItems test and passed on rerun. |
Stacked on #241.
Why
The Deploy workflow logged in as
ryan, andsite-deployreached tfmc's checkouts through ryan's bindfs views in~/work. Through those views git wrote new files as 660, hence the chmod loop, and deploys depended on one person's home folder and login key. Found in the 2026-10-16 host permissions audit.What changes
deploy.yml:SSH_USER: psdeploy. The sameDEPLOY_SSH_KEYmoves to psdeploy'sauthorized_keys, pinned to the newscripts/site-deploy-ssh.sh(/usr/local/sbin/site-deploy-ssh), which runssudo -u tfmc /usr/local/sbin/site-deploy. The preview key keeps its own forced command, so it still cannot deploy a site.site-deploy.sh: installed root-owned in/usr/local/sbinand run astfmc. It works on/home/tfmc/...directly, callsps-composewithout sudo, setsumask 022, logs and locks under/home/tfmc, and drops the chmod loop.Host steps (before merging)
Fix root-owned files in both checkouts (
chown -R tfmc) and make tracked files world-readable once. Install both scripts and add sudoerspsdeploy → (tfmc) site-deployandtfmc → (root) tfmc-patchnotes-update. Add the deploy key to psdeploy with the new forced command, keeping ryan's line until a deploy through psdeploy passes.Docs: TF-Minecraft/Docs#281
🤖 Generated with Claude Code