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..."