feat: 配置主分支低权限自动部署、备份与失败回退

这个提交包含在:
wikiboss
2026-10-28 17:57:30 +08:00
父节点 6efbe117bc
当前提交 d5f108b0c5
共有 5 个文件被更改,包括 368 次插入 和 0 次删除

查看文件

@@ -0,0 +1,19 @@
[Unit]
Description=Deploy grain backend and screen master branches
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=www
Group=www
ExecStart=/usr/bin/python3 /opt/grain-auto-deploy/auto_deploy.py
TimeoutStartSec=600
UMask=0022
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
ReadWritePaths=/var/lib/grain-auto-deploy /www/backup/grain-auto-deploy /www/wwwroot/grain.gynhc.com /var/log/grain-auto-deploy.log
ReadOnlyPaths=/www/wwwroot/grain.gynhc.com/.git /www/wwwroot/grain.gynhc.com/application/database.php /www/wwwroot/grain.gynhc.com/application/config.php /www/wwwroot/grain.gynhc.com/application/extra/site.php
RestrictSUIDSGID=true