2016-03-17 06:37:15 -05:00
|
|
|
; see `man systemd.unit` for configuration details
|
|
|
|
; the man section also explains *specifiers* `%x`
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Caddy HTTP/2 web server %I
|
|
|
|
Documentation=https://caddyserver.com/docs
|
2016-03-18 06:36:54 -05:00
|
|
|
After=network-online.target
|
|
|
|
Wants=network-online.target
|
|
|
|
Wants=systemd-networkd-wait-online.service
|
2016-03-17 06:37:15 -05:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
; run user and group for caddy
|
|
|
|
User=%i
|
|
|
|
Group=http
|
|
|
|
ExecStart=/usr/bin/caddy -agree=true -conf=/etc/caddy/Caddyfile
|
|
|
|
Restart=on-failure
|
|
|
|
; create a private temp folder that is not shared with other processes
|
|
|
|
PrivateTmp=true
|
|
|
|
; limit the number of file descriptors, see `man systemd.exec` for more limit settings
|
|
|
|
LimitNOFILE=8192
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|