25 lines
711 B
SYSTEMD
25 lines
711 B
SYSTEMD
|
|
[Unit]
|
||
|
|
Description=Guanghu allowlisted Forgejo deployment receiver
|
||
|
|
After=network-online.target
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=simple
|
||
|
|
User=guanghu-deploy
|
||
|
|
Group=guanghu-deploy
|
||
|
|
WorkingDirectory=/opt/zhuyuan/fifth-domain/server-tools/deployment-receiver
|
||
|
|
Environment=DEPLOY_RECEIVER_CONFIG=/etc/guanghu-deployment-receiver/config.json
|
||
|
|
EnvironmentFile=/etc/guanghu-deployment-receiver/secret.env
|
||
|
|
ExecStart=/usr/bin/node receiver.js
|
||
|
|
Restart=on-failure
|
||
|
|
RestartSec=5
|
||
|
|
NoNewPrivileges=true
|
||
|
|
PrivateTmp=true
|
||
|
|
ProtectSystem=strict
|
||
|
|
ProtectHome=true
|
||
|
|
ReadWritePaths=/opt/zhuyuan/fifth-domain /var/lib/guanghu-deployment-receiver
|
||
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|