From 52d157be692c4a6a9316f5e69bfd1856b40dbaa1 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Mon, 13 Jul 2026 08:16:31 -0400 Subject: [PATCH] Update install docs and script for Ubuntu (apt/ufw instead of dnf/firewall-cmd) Co-Authored-By: Claude Sonnet 4.6 --- README.md | 20 +++++++++++--------- deploy/install.sh | 11 +++++------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 322adde..ad9e66e 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,21 @@ tail -f .vite.log # Vite dev server --- -## Production Install (Rocky Linux / systemd) +## Production Install (Ubuntu / systemd) Installs the app as a persistent systemd service under `/opt/study-app`. ```bash +# Install Node.js 20 (if not already installed) +curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - +sudo apt-get install -y nodejs + +# Install build tools (required for better-sqlite3) +sudo apt-get install -y build-essential python3 + +# Clone and install git clone https://github.com/nmemmert/study-bible-project.git cd study-bible-project - -# Install build tools (first time only) -sudo dnf groupinstall -y "Development Tools" -sudo dnf install -y python3 - -# Install and enable the service sudo bash deploy/install.sh ``` @@ -70,8 +72,8 @@ systemctl restart study-app # Restart after an update **Open the firewall port (if needed):** ```bash -sudo firewall-cmd --add-port=3001/tcp --permanent -sudo firewall-cmd --reload +sudo ufw allow 3001/tcp +sudo ufw reload ``` The app listens on **port 3001** by default. Set the `PORT` environment variable in the systemd unit to change it. diff --git a/deploy/install.sh b/deploy/install.sh index e52d7e3..d6f59a4 100755 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -22,9 +22,9 @@ echo "=== Installing Bible Study App to $INSTALL_DIR ===" # ── Node check ──────────────────────────────────────────────────────────────── if ! command -v node >/dev/null 2>&1; then echo "ERROR: Node.js is not installed." - echo "On Rocky Linux, install via NodeSource, e.g.:" - echo " curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -" - echo " sudo dnf install -y nodejs" + echo "On Ubuntu, install via NodeSource, e.g.:" + echo " curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -" + echo " sudo apt-get install -y nodejs" exit 1 fi NODE_VERSION=$(node -v | sed 's/v//' | cut -d. -f1) @@ -36,9 +36,8 @@ echo "Node.js $(node -v) found." # build tools needed for better-sqlite3 native module if ! command -v gcc >/dev/null 2>&1 || ! command -v make >/dev/null 2>&1; then - echo "Installing build tools (Development Tools group + python3)..." - dnf groupinstall -y "Development Tools" - dnf install -y python3 + echo "Installing build tools (build-essential + python3)..." + apt-get install -y build-essential python3 fi # ── Create service user ─────────────────────────────────────────────────────