abiosoft / caddy-docker

Docker container for Caddy
https://hub.docker.com/r/abiosoft/caddy/
MIT License
768 stars 315 forks source link

Build tool suggestion: also generate service file? #115

Open unquietwiki opened 6 years ago

unquietwiki commented 6 years ago

@abiosoft per your suggestion, I tried your build tool. I already have a service file standard in place where I use Caddy; you might want to attempt generating one that folks could modify for their needs?

Related suggestion: maybe also a suggestion to the user to /sbin/setcap CAP_NET_BIND_SERVICE=+eip (installed caddy binary) ?

[Unit]
Description=Caddy
After=network.target
[Service]
Type=simple
LimitNOFILE=8192
ExecStartPre=/bin/mkdir -p /tmp/caddy_cache
ExecStart=/usr/local/bin/caddy -conf /etc/default/caddy
ExecReload=/usr/bin/pkill -USR1 caddy
User=caddy
Group=caddy
[Install]
WantedBy=multi-user.target
hartwork commented 6 years ago

Have you seen https://github.com/mholt/caddy/blob/master/dist/init/linux-systemd/caddy.service ?