Use stored SITE_DOMAIN as default in Caddy domain prompt
lib/common.sh: configure_caddy_for_service now pre-fills the domain prompt with $DEFAULT_SUBDOMAIN.$SITE_DOMAIN when a site domain has been configured (setup.sh configure / ~/docker/.config). No more typing the full domain for every service — just press Enter to accept the default. services/mattermost.sh: remove redundant custom Caddy/domain block added in the previous commit. MATTERMOST_SITE_URL is already computed from SITE_DOMAIN before configure_caddy_for_service is called, so the simple call is sufficient. https://claude.ai/code/session_014CCYqVwW6d6f5dw1qRokYt
This commit is contained in:
+8
-2
@@ -297,10 +297,16 @@ configure_caddy_for_service() {
|
||||
|
||||
echo ""
|
||||
echo "Enter the full domain for $SERVICE_NAME:"
|
||||
echo " Examples: $DEFAULT_SUBDOMAIN.example.com, $DEFAULT_SUBDOMAIN.yourdomain.com"
|
||||
local _default_domain=""
|
||||
if [ -n "$SITE_DOMAIN" ] && [ "$SITE_DOMAIN" != "example.com" ]; then
|
||||
_default_domain="$DEFAULT_SUBDOMAIN.$SITE_DOMAIN"
|
||||
echo " Default: $_default_domain"
|
||||
else
|
||||
echo " Examples: $DEFAULT_SUBDOMAIN.example.com, $DEFAULT_SUBDOMAIN.yourdomain.com"
|
||||
fi
|
||||
echo ""
|
||||
local SERVICE_DOMAIN=""
|
||||
prompt_text "Domain:" "" SERVICE_DOMAIN
|
||||
prompt_text "Domain [${_default_domain:-required}]:" "$_default_domain" SERVICE_DOMAIN
|
||||
if [ -z "$SERVICE_DOMAIN" ]; then
|
||||
echo " ⚠ No domain provided, skipping Caddy configuration."; return 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user