git pull inside the deploy needs to update .git/FETCH_HEAD, but ProtectSystem=full makes /etc read-only. ReadWritePaths=/etc/caddy opens just the repo directory.
19 lines
347 B
Desktop File
19 lines
347 B
Desktop File
[Unit]
|
|
Description=Caddy-conf deploy webhook
|
|
After=network.target caddy.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/bin/python3 /etc/caddy/scripts/webhook/webhook.py
|
|
Restart=on-failure
|
|
RestartSec=2
|
|
User=root
|
|
ProtectSystem=full
|
|
ReadWritePaths=/etc/caddy
|
|
ProtectHome=true
|
|
NoNewPrivileges=true
|
|
PrivateTmp=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|