From 1aa5ec456e01b03c8cc4277c4a7031718ac94790 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 30 May 2026 15:08:26 +0000 Subject: [PATCH] chore: install.sh asks for domain name instead of raw URL - Prompts for domain and HTTPS preference - Builds proper BASE_URL from domain + protocol - Defaults to http://localhost:8080 --- install.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 4c12798..13607bb 100755 --- a/install.sh +++ b/install.sh @@ -171,12 +171,25 @@ fi # ── 6. General settings ────────────────────────────────────────── echo "" echo " ── General ──" -ask " Public URL [http://localhost:8080]: " -read -r BASE_URL -BASE_URL="${BASE_URL:-http://localhost:8080}" +echo " If the app is behind a proxy (e.g. dev.lohmar.co.uk), enter the domain." +echo " Otherwise leave blank to use localhost." +echo "" +ask " Domain name [localhost]: " +read -r DOMAIN +DOMAIN="${DOMAIN:-localhost}" +ask " HTTPS? (y/N): " +read -r USE_HTTPS +if [[ "$USE_HTTPS" =~ ^[Yy]$ ]]; then + BASE_URL="https://${DOMAIN}" +else + BASE_URL="http://${DOMAIN}" +fi ask " Web server port [8080]: " read -r PORT PORT="${PORT:-8080}" +if [ "$DOMAIN" = "localhost" ]; then + BASE_URL="http://localhost:${PORT}" +fi # ── 7. Write .env ──────────────────────────────────────────────── info "Creating .env..."