From a9446190da1108186768cac281621b6b88c27f12 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 1 Jul 2026 16:45:47 +0000 Subject: [PATCH] setup.sh: ask Caddy location first in site wizard, skip network prompt if not local MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reorders the site defaults wizard so 'Where does Caddy run?' comes before timezone/domain, since it's the more fundamental choice and the answer context matters when explaining the other prompts. Also skips the Caddy Docker network prompt entirely when Caddy isn't running locally — that setting is only relevant to services joining a local Caddy container's bridge network; remote/none mode proxies via localhost:PORT + snippet files instead. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01LQJBvqzXeyuhhAcAA3Q5Wq --- setup.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index da2667b..2a21fb1 100755 --- a/setup.sh +++ b/setup.sh @@ -131,11 +131,6 @@ run_site_configure() { [ -z "$_cur_mode" ] && [ -n "${CADDY_REMOTE_HOST:-}" ] && _cur_mode="remote" [ -z "$_cur_mode" ] && _cur_mode="local" - prompt_text " Timezone [${_cur_tz}]:" "$_cur_tz" SITE_TZ - prompt_text " Base domain (e.g., example.com) [${_cur_dom:-}]:" "$_cur_dom" SITE_DOMAIN - prompt_text " Caddy Docker network [${_cur_net}]:" "$_cur_net" SITE_CADDY_NET - - echo "" echo " Where does Caddy run?" echo " [1] This machine — Caddy installed here (default)" echo " [2] Remote machine — different server, VPN node, or Netbird peer" @@ -152,6 +147,17 @@ run_site_configure() { *) CADDY_MODE="local" ;; esac CADDY_REMOTE_HOST="" # clear legacy value; CADDY_MODE is authoritative now + echo "" + + prompt_text " Timezone [${_cur_tz}]:" "$_cur_tz" SITE_TZ + prompt_text " Base domain (e.g., example.com) [${_cur_dom:-}]:" "$_cur_dom" SITE_DOMAIN + + # Caddy Docker network only matters when Caddy runs locally — it's the + # shared bridge network services join to reach a local Caddy container + # by name. Remote/none Caddy proxies via localhost:PORT instead. + if [ "$CADDY_MODE" = "local" ]; then + prompt_text " Caddy Docker network [${_cur_net}]:" "$_cur_net" SITE_CADDY_NET + fi export SITE_TZ SITE_DOMAIN SITE_CADDY_NET CADDY_MODE CADDY_REMOTE_HOST mkdir -p "$DOCKER_DIR"