25 lines
604 B
Django/Jinja
Executable file
25 lines
604 B
Django/Jinja
Executable file
[Unit]
|
|
Description=Caddy HTTP/2 web server
|
|
Documentation=https://caddyserver.com/docs
|
|
After=network.target
|
|
|
|
[Service]
|
|
# Service config and instructions
|
|
WorkingDirectory={{ caddy_home }}
|
|
User=caddy
|
|
LimitNOFILE=8192
|
|
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
|
|
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
|
|
Restart=on-failure
|
|
StartLimitInterval=600
|
|
TimeoutStopSec=5s
|
|
KillSignal=SIGQUIT
|
|
# Service security
|
|
ProtectHome=true
|
|
ProtectSystem=full
|
|
PrivateTmp=true
|
|
ReadWritePaths={{ caddy_home }}
|
|
ReadWriteDirectories={{ caddy_home }}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|