41 lines
1.1 KiB
Desktop File
41 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Deploy webhook for the audit endpoint (git push -> auto pull + restart)
|
|
Documentation=https://git.sascha-bach.de/saschabach/portfolio-page
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=auditapi
|
|
Group=auditapi
|
|
WorkingDirectory=/opt/audit-endpoint/backend/webhook
|
|
ExecStart=/usr/bin/node server.js
|
|
Restart=always
|
|
RestartSec=5
|
|
|
|
# --- Hardening -------------------------------------------------------------
|
|
# Unlike audit-endpoint.service, this one genuinely needs to write to the
|
|
# checkout (git reset --hard, npm install), hence ReadWritePaths below -
|
|
# everything else stays as locked down as the main service.
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
PrivateDevices=true
|
|
ProtectSystem=strict
|
|
ReadWritePaths=/opt/audit-endpoint
|
|
ProtectHome=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
ProtectHostname=true
|
|
ProtectClock=true
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
|
RestrictNamespaces=true
|
|
RestrictRealtime=true
|
|
RestrictSUIDSGID=true
|
|
LockPersonality=true
|
|
SystemCallArchitectures=native
|
|
MemoryDenyWriteExecute=false
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|