feat: 配置主分支低权限自动部署、备份与失败回退
这个提交包含在:
19
ops/grain-auto-deploy.service
普通文件
19
ops/grain-auto-deploy.service
普通文件
@@ -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
|
||||
在新工单中引用
屏蔽一个用户