feat(guanghu-os): stage independent Forgejo continuity

This commit is contained in:
冰朔 2026-08-15 20:54:53 +08:00
commit e4750c57a7
10 changed files with 467 additions and 3 deletions

View file

@ -0,0 +1,29 @@
[Unit]
Description=Independent full Forgejo shadow for JD native service continuity
After=network.target
[Service]
Type=simple
User=guanghu-code-shadow
Group=guanghu-code-shadow
WorkingDirectory=/var/lib/guanghu-code-shadow
ExecStart=/var/lib/guanghu-code-shadow/bin/forgejo web --work-path /var/lib/guanghu-code-shadow --config /etc/guanghu-os/forgejo-shadow/app.ini
Restart=on-failure
RestartSec=3
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=strict
ProtectHome=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
ReadOnlyPaths=/etc/guanghu-os/forgejo-shadow
ReadWritePaths=/var/lib/guanghu-code-shadow
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictSUIDSGID=yes
LockPersonality=yes
UMask=0027
[Install]
WantedBy=multi-user.target