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`.
|
Installs the app as a persistent systemd service under `/opt/study-app`.
|
||||||
|
|
||||||
```bash
|
```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
|
git clone https://github.com/nmemmert/study-bible-project.git
|
||||||
cd study-bible-project
|
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
|
sudo bash deploy/install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -70,8 +72,8 @@ systemctl restart study-app # Restart after an update
|
|||||||
|
|
||||||
**Open the firewall port (if needed):**
|
**Open the firewall port (if needed):**
|
||||||
```bash
|
```bash
|
||||||
sudo firewall-cmd --add-port=3001/tcp --permanent
|
sudo ufw allow 3001/tcp
|
||||||
sudo firewall-cmd --reload
|
sudo ufw reload
|
||||||
```
|
```
|
||||||
|
|
||||||
The app listens on **port 3001** by default. Set the `PORT` environment variable in the systemd unit to change it.
|
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 ────────────────────────────────────────────────────────────────
|
# ── Node check ────────────────────────────────────────────────────────────────
|
||||||
if ! command -v node >/dev/null 2>&1; then
|
if ! command -v node >/dev/null 2>&1; then
|
||||||
echo "ERROR: Node.js is not installed."
|
echo "ERROR: Node.js is not installed."
|
||||||
echo "On Rocky Linux, install via NodeSource, e.g.:"
|
echo "On Ubuntu, install via NodeSource, e.g.:"
|
||||||
echo " curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -"
|
echo " curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -"
|
||||||
echo " sudo dnf install -y nodejs"
|
echo " sudo apt-get install -y nodejs"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NODE_VERSION=$(node -v | sed 's/v//' | cut -d. -f1)
|
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
|
# build tools needed for better-sqlite3 native module
|
||||||
if ! command -v gcc >/dev/null 2>&1 || ! command -v make >/dev/null 2>&1; then
|
if ! command -v gcc >/dev/null 2>&1 || ! command -v make >/dev/null 2>&1; then
|
||||||
echo "Installing build tools (Development Tools group + python3)..."
|
echo "Installing build tools (build-essential + python3)..."
|
||||||
dnf groupinstall -y "Development Tools"
|
apt-get install -y build-essential python3
|
||||||
dnf install -y python3
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Create service user ─────────────────────────────────────────────────────
|
# ── Create service user ─────────────────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user