diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba67f9..beb4bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to Primora. Format follows [Keep a Changelog](https://keepac ### Added -- **Install script asks for the public URL** — `install.sh` now prompts for where you'll open the app and accepts a full URL: `https://primora.example.com` (TLS at your proxy, hints printed at the end), `primora.example.com`, or `192.168.1.50:8085` (the port becomes `NGINX_PORT`). The answer rewrites every public URL var in `.env` and `COOKIE_DOMAIN` for real DNS names. Non-interactive via `PUBLIC_URL=`; legacy `DOMAIN`/`NGINX_PORT` envs still work; reruns over an existing `.env` skip the question. +- **Install script asks for the public URL** — `install.sh` now prompts for where you'll open the app and accepts a full URL: `https://primora.example.com` (TLS at your proxy, hints printed at the end), `primora.example.com`, or `192.168.1.50:8085` (the port becomes `NGINX_PORT`). The answer rewrites every public URL var in `.env` and `COOKIE_DOMAIN` for real DNS names. The prompt reads the controlling terminal so it appears under `curl | bash`; no tty (CI, cron) falls back to `localhost`. Non-interactive via `PUBLIC_URL=`; legacy `DOMAIN`/`NGINX_PORT` envs still work; reruns over an existing `.env` skip the question. ## [0.8.2] - 2026-09-28 diff --git a/install.sh b/install.sh index ad26658..35a6658 100755 --- a/install.sh +++ b/install.sh @@ -57,12 +57,13 @@ else if [ -z "$PUBLIC_URL" ]; then DEFAULT_URL="http://localhost" [ "$NGINX_PORT" != "80" ] && DEFAULT_URL="http://localhost:$NGINX_PORT" - if [ -t 0 ]; then - read -rp "URL where you'll open Primora (domain or IP, e.g. https://primora.example.com) [$DEFAULT_URL]: " PUBLIC_URL - PUBLIC_URL="${PUBLIC_URL:-$DEFAULT_URL}" - else - PUBLIC_URL="$DEFAULT_URL" + # Under `curl | bash` stdin is the script pipe — prompt on the + # controlling terminal instead. No tty (CI/cron) → default silently. + if exec 9/dev/null; then + read -rp "URL where you'll open Primora (domain or IP, e.g. https://primora.example.com) [$DEFAULT_URL]: " PUBLIC_URL <&9 || true + exec 9>&- fi + PUBLIC_URL="${PUBLIC_URL:-$DEFAULT_URL}" fi # Normalize: default scheme http, strip trailing slash.