Simplify Caddy infrastructure to use file-based configuration instead of complex API registration system
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
[Service]
|
||||
# Reload configuration with --force flag for reliability
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/caddy run --config {{ caddy_config_file }} --resume
|
||||
|
||||
ExecReload=
|
||||
ExecReload=/usr/bin/caddy reload --config {{ caddy_config_file }} --force
|
||||
|
||||
# Wait for API to be ready before considering service started
|
||||
ExecStartPost=/bin/bash -c 'until curl -s http://{{ caddy_admin_listen }}/config/ >/dev/null 2>&1; do sleep 1; done'
|
||||
|
||||
{% if caddy_systemd_security | default(true) %}
|
||||
# Enhanced security hardening beyond base service
|
||||
NoNewPrivileges=true
|
||||
@@ -35,4 +40,4 @@ SystemCallErrorNumber=EPERM
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=caddy
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user