Add remote Caddy support — generate snippet files when Caddy is on another host
New site config key: CADDY_REMOTE_HOST (set via 'sudo ./setup.sh configure'). When set, configure_caddy_for_service operates in "remote" mode instead of writing to a local Caddyfile: - Upstream uses CADDY_REMOTE_HOST:PORT (host IP, not container name) - Snippet saved to ~/docker/caddy-snippets/<subdomain>.caddy - User is shown scp/rsync commands to copy it to the Caddy machine Three modes in configure_caddy_for_service (lib/common.sh and inline stubs): local: ~/docker/caddy/ exists → write Caddyfile + reload (existing behavior) remote: CADDY_REMOTE_HOST set → save snippet, print copy instructions none: neither configured → silent return (unchanged) All 31 service standalone bootstrap stubs updated with the new logic. CADDY_REMOTE_HOST global added to all 42 standalone bootstrap sections. setup.sh configure now prompts for CADDY_REMOTE_HOST with a clear explanation. wolf.sh: add missing stubs (configure_caddy_for_service, write_readme, prompt_yn, ensure_docker_dir_ownership) and the Authelia/Caddy/start calls that were missing from the install function. https://claude.ai/code/session_014CCYqVwW6d6f5dw1qRokYt
This commit is contained in:
@@ -73,6 +73,7 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
SITE_TZ="${SITE_TZ:-$(cat /etc/timezone 2>/dev/null || echo UTC)}"
|
||||
SITE_DOMAIN="${SITE_DOMAIN:-example.com}"
|
||||
SITE_CADDY_NET="${SITE_CADDY_NET:-caddy_net}"
|
||||
CADDY_REMOTE_HOST="${CADDY_REMOTE_HOST:-}"
|
||||
|
||||
register_service() { :; } # no-op — no wizard to register into
|
||||
_RUN_STANDALONE=1
|
||||
|
||||
Reference in New Issue
Block a user