installer: accept ABS_URL/PORT as positional args, default REPO_URL
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,19 +4,25 @@
|
||||
# that serves the app and reverse-proxies to your Audiobookshelf server.
|
||||
#
|
||||
# Usage (as root on the container):
|
||||
# REPO_URL=https://git.scarriffle.com/<owner>/shelfless.git \
|
||||
# ABS_URL=http://127.0.0.1:13378 PORT=8080 \
|
||||
# bash install.sh
|
||||
# bash deploy/install.sh [ABS_URL] [PORT]
|
||||
#
|
||||
# Examples:
|
||||
# bash deploy/install.sh # ABS at localhost:13378, port 8080
|
||||
# bash deploy/install.sh http://192.168.1.10:13378 # ABS elsewhere
|
||||
# bash deploy/install.sh http://192.168.1.10:13378 9000
|
||||
#
|
||||
# All values can also be given as env vars (REPO_URL, ABS_URL, PORT, INSTALL_DIR).
|
||||
# Re-running updates an existing install.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_URL="${REPO_URL:?Set REPO_URL to your git repo, e.g. https://git.scarriffle.com/owner/shelfless.git}"
|
||||
REPO_URL="${REPO_URL:-https://git.scarriffle.com/Scarriffle/shelfless.git}"
|
||||
ABS_URL="${1:-${ABS_URL:-http://127.0.0.1:13378}}"
|
||||
PORT="${2:-${PORT:-8080}}"
|
||||
INSTALL_DIR="${INSTALL_DIR:-/opt/shelfless}"
|
||||
ABS_URL="${ABS_URL:-http://127.0.0.1:13378}"
|
||||
PORT="${PORT:-8080}"
|
||||
SERVICE="${SERVICE:-shelfless}"
|
||||
|
||||
echo "==> Config: ABS_URL=$ABS_URL PORT=$PORT INSTALL_DIR=$INSTALL_DIR"
|
||||
|
||||
echo "==> Installing system dependencies"
|
||||
apt-get update -y
|
||||
apt-get install -y git curl ca-certificates
|
||||
|
||||
Reference in New Issue
Block a user