Update install docs and script for Ubuntu (apt/ufw instead of dnf/firewall-cmd)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
+5
-6
@@ -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 ─────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user