feat: direct VPS installer — Node.js 22 + Caddy + systemd, no Docker
Replaces the Docker-based install.sh with a direct-install approach: - Docker cleanup: removes container, stops daemon, uninstalls packages - Node.js 22 via NodeSource apt/rpm/pacman repos - Caddy via Cloudsmith apt/COPR/pacman repos - Clone, npm ci, npm run build, standalone output - systemd unit (worst-scan-web.service) — user-level service, HOSTNAME=127.0.0.1 - Caddy reverse proxy on :80 → 127.0.0.1:3000 - deploy/ reference files for manual editing ~150-160 MB RAM total (vs ~300-400 MB with Docker) on 1GB VPS
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
# worst-scan-web — Caddy reverse proxy
|
||||||
|
# Copy to /etc/caddy/Caddyfile or include from there.
|
||||||
|
# Replace :80 with your domain for auto-HTTPS.
|
||||||
|
|
||||||
|
:80 {
|
||||||
|
reverse_proxy 127.0.0.1:3000
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=worst-scan-web
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
User=ren
|
||||||
|
WorkingDirectory=/home/ren/worst-scan-web/.next/standalone
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
Environment=PORT=3000
|
||||||
|
Environment=HOSTNAME=127.0.0.1
|
||||||
|
Environment=DB_PATH=/home/ren/worst-scan-web/data/worst-scan.db
|
||||||
|
Environment=COVERS_DIR=/home/ren/worst-scan-web/data/covers
|
||||||
|
ExecStart=/usr/bin/node server.js
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
+166
-148
@@ -2,167 +2,113 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
# worst-scan-web — Docker auto-installer
|
# worst-scan-web — Direct installer (no Docker)
|
||||||
# Usage: bash <(curl -fsSL https://gitea.cbcren.online/renato97/worst-scan-web/raw/branch/main/install.sh)
|
# Usage: bash <(curl -fsSL https://gitea.cbcren.online/renato97/worst-scan-web/raw/branch/main/install.sh)
|
||||||
# Or: curl -fsSL https://gitea.cbcren.online/renato97/worst-scan-web/raw/branch/main/install.sh -o install.sh && bash install.sh
|
|
||||||
# ──────────────────────────────────────────────
|
# ──────────────────────────────────────────────
|
||||||
|
|
||||||
REPO_URL="https://gitea.cbcren.online/renato97/worst-scan-web.git"
|
REPO_URL="https://gitea.cbcren.online/renato97/worst-scan-web.git"
|
||||||
INSTALL_DIR="${HOME}/worst-scan-web"
|
INSTALL_DIR="${HOME}/worst-scan-web"
|
||||||
BRANCH="main"
|
BRANCH="main"
|
||||||
|
|
||||||
# Colors
|
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; CYAN='\033[0;36m'; NC='\033[0m'
|
||||||
RED='\033[0;31m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
YELLOW='\033[1;33m'
|
|
||||||
CYAN='\033[0;36m'
|
|
||||||
NC='\033[0m'
|
|
||||||
|
|
||||||
log() { printf "${GREEN}✓${NC} %s\n" "$1"; }
|
log() { printf "${GREEN}✓${NC} %s\n" "$1"; }
|
||||||
warn() { printf "${YELLOW}⚠${NC} %s\n" "$1"; }
|
warn() { printf "${YELLOW}⚠${NC} %s\n" "$1"; }
|
||||||
err() { printf "${RED}✗${NC} %s\n" "$1"; }
|
err() { printf "${RED}✗${NC} %s\n" "$1"; }
|
||||||
info() { printf "${CYAN}→${NC} %s\n" "$1"; }
|
info() { printf "${CYAN}→${NC} %s\n" "$1"; }
|
||||||
|
|
||||||
# ── OS detection ──────────────────────────────────
|
# ── OS detection ────────────────────────────────
|
||||||
detect_os() {
|
detect_os() {
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
. /etc/os-release
|
. /etc/os-release && echo "$ID"
|
||||||
echo "$ID"
|
|
||||||
elif command -v lsb_release &>/dev/null; then
|
elif command -v lsb_release &>/dev/null; then
|
||||||
lsb_release -si | tr '[:upper:]' '[:lower:]'
|
lsb_release -si | tr '[:upper:]' '[:lower:]'
|
||||||
else
|
else echo "unknown"; fi
|
||||||
echo "unknown"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OS=$(detect_os)
|
OS=$(detect_os)
|
||||||
RAW_ARCH=$(uname -m)
|
|
||||||
case "$RAW_ARCH" in
|
|
||||||
x86_64) ARCH="amd64" ;;
|
|
||||||
aarch64) ARCH="arm64" ;;
|
|
||||||
*) ARCH="$RAW_ARCH" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# ── Git ──────────────────────────────────────────
|
bail() { err "Unsupported OS: $OS. Install manually: $1"; exit 1; }
|
||||||
if ! command -v git &>/dev/null; then
|
|
||||||
info "Installing git..."
|
# ── Sudo check ─────────────────────────────────
|
||||||
case "$OS" in
|
sudo -v || (err "sudo required" && exit 1)
|
||||||
ubuntu|debian) sudo apt update -qq && sudo apt install -y -qq git ;;
|
|
||||||
arch|endeavouros) sudo pacman -S --noconfirm git ;;
|
# ── git + curl ─────────────────────────────────
|
||||||
fedora|centos|rhel|almalinux|rocky) sudo dnf install -y git ;;
|
for cmd in git curl; do
|
||||||
*) err "Unsupported OS: $OS. Install git manually." && exit 1 ;;
|
if ! command -v "$cmd" &>/dev/null; then
|
||||||
esac
|
info "Installing $cmd..."
|
||||||
log "git installed"
|
case "$OS" in
|
||||||
|
ubuntu|debian) sudo apt update -qq && sudo apt install -y -qq "$cmd" ;;
|
||||||
|
arch|endeavouros) sudo pacman -S --noconfirm "$cmd" ;;
|
||||||
|
fedora|centos|rhel|*) sudo dnf install -y "$cmd" ;;
|
||||||
|
esac
|
||||||
|
log "$cmd installed"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# ── Docker cleanup ──────────────────────────────
|
||||||
|
if command -v docker &>/dev/null; then
|
||||||
|
info "Cleaning up Docker..."
|
||||||
|
if [ -f "$INSTALL_DIR/docker-compose.yml" ]; then
|
||||||
|
(cd "$INSTALL_DIR" && docker compose down) 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
sudo docker stop worst-scan-web 2>/dev/null || true
|
||||||
|
sudo docker rm worst-scan-web 2>/dev/null || true
|
||||||
|
sudo systemctl stop docker docker.socket 2>/dev/null || true
|
||||||
|
sudo systemctl disable docker docker.socket 2>/dev/null || true
|
||||||
|
sudo apt remove -y -qq docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras 2>/dev/null || true
|
||||||
|
sudo rm -f /etc/apt/sources.list.d/docker.list /etc/apt/keyrings/docker.asc
|
||||||
|
sudo apt update -qq 2>/dev/null || true
|
||||||
|
log "Docker removed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Docker ───────────────────────────────────────
|
# ── Node.js 22 ──────────────────────────────────
|
||||||
NEED_DOCKER=false
|
if ! command -v node &>/dev/null || [ "$(node -v | cut -d. -f1 | tr -d v)" -lt 22 ]; then
|
||||||
NEED_COMPOSE=false
|
info "Installing Node.js 22..."
|
||||||
|
|
||||||
if ! command -v docker &>/dev/null; then
|
|
||||||
NEED_DOCKER=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! docker compose version &>/dev/null && ! docker-compose --version &>/dev/null; then
|
|
||||||
NEED_COMPOSE=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if $NEED_DOCKER; then
|
|
||||||
info "Installing Docker Engine..."
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
curl -fsSL https://get.docker.com | sh
|
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash
|
||||||
|
sudo apt install -y -qq nodejs
|
||||||
;;
|
;;
|
||||||
arch|endeavouros)
|
arch|endeavouros)
|
||||||
sudo pacman -S --noconfirm docker
|
sudo pacman -S --noconfirm nodejs npm
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
sudo dnf install -y dnf-plugins-core
|
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash
|
||||||
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
sudo dnf install -y nodejs
|
||||||
sudo dnf install -y docker-ce docker-ce-cli containerd.io
|
|
||||||
;;
|
|
||||||
centos|rhel|almalinux|rocky)
|
|
||||||
sudo dnf install -y dnf-plugins-core
|
|
||||||
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
|
|
||||||
sudo dnf install -y docker-ce docker-ce-cli containerd.io
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
err "Unsupported OS: $OS. Install Docker manually: https://docs.docker.com/engine/install/"
|
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
|
*) bail "https://nodejs.org/en/download/" ;;
|
||||||
esac
|
esac
|
||||||
log "Docker Engine installed"
|
log "Node.js $(node -v) installed"
|
||||||
|
else
|
||||||
|
log "Node.js $(node -v) already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Re-check compose — fresh Docker install may have included it
|
# ── Caddy ────────────────────────────────────────
|
||||||
if $NEED_COMPOSE && docker compose version &>/dev/null; then
|
if ! command -v caddy &>/dev/null; then
|
||||||
NEED_COMPOSE=false
|
info "Installing Caddy..."
|
||||||
fi
|
|
||||||
|
|
||||||
if $NEED_COMPOSE; then
|
|
||||||
info "Installing Docker Compose plugin..."
|
|
||||||
case "$OS" in
|
case "$OS" in
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
sudo apt install -y -qq docker-compose-v2 2>/dev/null || {
|
sudo apt install -y -qq debian-keyring debian-archive-keyring apt-transport-https
|
||||||
sudo apt install -y -qq docker-compose-plugin 2>/dev/null || {
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/setup.deb.sh' | sudo bash
|
||||||
warn "Compose plugin not in apt. Installing via CLI plugin..."
|
sudo apt install -y -qq caddy
|
||||||
CLI_PLUGINS="/usr/lib/docker/cli-plugins"
|
|
||||||
sudo mkdir -p "$CLI_PLUGINS"
|
|
||||||
sudo curl -fsSL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o "$CLI_PLUGINS/docker-compose"
|
|
||||||
sudo chmod +x "$CLI_PLUGINS/docker-compose"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
;;
|
;;
|
||||||
arch|endeavouros)
|
arch|endeavouros)
|
||||||
sudo pacman -S --noconfirm docker-compose
|
sudo pacman -S --noconfirm caddy
|
||||||
;;
|
;;
|
||||||
fedora|centos|rhel|almalinux|rocky)
|
fedora)
|
||||||
sudo dnf install -y docker-compose-v2 2>/dev/null || {
|
sudo dnf install -y 'dnf-command(copr)'
|
||||||
CLI_PLUGINS="/usr/lib/docker/cli-plugins"
|
sudo dnf copr enable -y @caddy/caddy
|
||||||
sudo mkdir -p "$CLI_PLUGINS"
|
sudo dnf install -y caddy
|
||||||
sudo curl -fsSL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o "$CLI_PLUGINS/docker-compose"
|
|
||||||
sudo chmod +x "$CLI_PLUGINS/docker-compose"
|
|
||||||
}
|
|
||||||
;;
|
;;
|
||||||
|
*) bail "https://caddyserver.com/docs/install" ;;
|
||||||
esac
|
esac
|
||||||
log "Docker Compose plugin installed"
|
log "Caddy $(caddy version | cut -d' ' -f1) installed"
|
||||||
fi
|
|
||||||
|
|
||||||
log "Docker prerequisites satisfied"
|
|
||||||
|
|
||||||
# ── Start Docker daemon ─────────────────────────
|
|
||||||
if ! docker info &>/dev/null; then
|
|
||||||
info "Starting Docker daemon..."
|
|
||||||
if command -v systemctl &>/dev/null; then
|
|
||||||
sudo systemctl enable --now docker
|
|
||||||
elif command -v service &>/dev/null; then
|
|
||||||
sudo service docker start
|
|
||||||
else
|
|
||||||
sudo dockerd &>/dev/null &
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
log "Docker daemon is running"
|
|
||||||
|
|
||||||
# ── Add user to docker group ────────────────────
|
|
||||||
if ! groups "$USER" | grep -q docker; then
|
|
||||||
info "Adding $USER to the docker group..."
|
|
||||||
sudo usermod -aG docker "$USER"
|
|
||||||
# Spawn subshell with the new group so rest of script can use docker without sudo
|
|
||||||
sg docker -c "true" 2>/dev/null || true
|
|
||||||
warn "You may need to re-login for group changes to take effect in new shells"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use sudo for docker commands if the current shell can't run docker directly
|
|
||||||
if docker info &>/dev/null 2>&1; then
|
|
||||||
docker_cmd() { docker "$@"; }
|
|
||||||
else
|
else
|
||||||
docker_cmd() { sudo docker "$@"; }
|
log "Caddy already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Clone / Pull ─────────────────────────────────
|
# ── Clone / Pull ─────────────────────────────────
|
||||||
if [ -d "$INSTALL_DIR" ]; then
|
if [ -d "$INSTALL_DIR" ]; then
|
||||||
info "Directory $INSTALL_DIR already exists — pulling latest"
|
info "Updating repository..."
|
||||||
cd "$INSTALL_DIR"
|
cd "$INSTALL_DIR"
|
||||||
git fetch origin "$BRANCH"
|
git fetch origin "$BRANCH"
|
||||||
git reset --hard "origin/$BRANCH"
|
git reset --hard "origin/$BRANCH"
|
||||||
@@ -179,60 +125,132 @@ INSTALL_DIR="$(cd "$INSTALL_DIR" && pwd)"
|
|||||||
# ── .env ─────────────────────────────────────────
|
# ── .env ─────────────────────────────────────────
|
||||||
if [ -f "$INSTALL_DIR/.env" ]; then
|
if [ -f "$INSTALL_DIR/.env" ]; then
|
||||||
warn ".env already exists — not overwriting"
|
warn ".env already exists — not overwriting"
|
||||||
info "Edit $INSTALL_DIR/.env if you need to change settings"
|
|
||||||
else
|
else
|
||||||
cp "$INSTALL_DIR/.env.example" "$INSTALL_DIR/.env"
|
cp "$INSTALL_DIR/.env.example" "$INSTALL_DIR/.env"
|
||||||
log "Created .env from .env.example"
|
log "Created .env from .env.example"
|
||||||
info "Open $INSTALL_DIR/.env and set up your API_BASE_URL, API_KEY, WEB_PASSWORD"
|
|
||||||
info "Then run the web setup wizard at http://YOUR_IP:3000/setup after starting"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ── Data directory ────────────────────────────────
|
# ── Data directory ────────────────────────────────
|
||||||
mkdir -p "$INSTALL_DIR/data"
|
mkdir -p "$INSTALL_DIR/data"
|
||||||
log "Data directory ready"
|
log "Data directory ready"
|
||||||
|
|
||||||
# ── Build & Start ────────────────────────────────
|
# ── Build ────────────────────────────────────────
|
||||||
info "Building Docker image (this may take a few minutes)..."
|
info "Installing npm dependencies..."
|
||||||
docker_cmd compose build web
|
cd "$INSTALL_DIR"
|
||||||
|
npm ci
|
||||||
|
log "Dependencies installed"
|
||||||
|
|
||||||
|
info "Building Next.js app (this may take a few minutes)..."
|
||||||
|
npm run build
|
||||||
log "Build complete"
|
log "Build complete"
|
||||||
|
|
||||||
info "Starting containers..."
|
STANDALONE_DIR="$INSTALL_DIR/.next/standalone"
|
||||||
docker_cmd compose up -d
|
|
||||||
log "Containers are running"
|
# Ensure static files are copied
|
||||||
|
if [ ! -d "$STANDALONE_DIR/.next/static" ]; then
|
||||||
|
mkdir -p "$STANDALONE_DIR/.next"
|
||||||
|
cp -r "$INSTALL_DIR/.next/static" "$STANDALONE_DIR/.next/static"
|
||||||
|
fi
|
||||||
|
cp -r "$INSTALL_DIR/public" "$STANDALONE_DIR/public" 2>/dev/null || true
|
||||||
|
|
||||||
|
# ── systemd service ──────────────────────────────
|
||||||
|
SERVICE_NAME="worst-scan-web"
|
||||||
|
APP_USER="$USER"
|
||||||
|
APP_HOME="$HOME"
|
||||||
|
|
||||||
|
sudo tee "/etc/systemd/system/$SERVICE_NAME.service" > /dev/null <<SYSTEMD
|
||||||
|
[Unit]
|
||||||
|
Description=worst-scan-web
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
User=$APP_USER
|
||||||
|
WorkingDirectory=$STANDALONE_DIR
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
Environment=PORT=3000
|
||||||
|
Environment=HOSTNAME=127.0.0.1
|
||||||
|
Environment=DB_PATH=$INSTALL_DIR/data/worst-scan.db
|
||||||
|
Environment=COVERS_DIR=$INSTALL_DIR/data/covers
|
||||||
|
ExecStart=/usr/bin/node server.js
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
SYSTEMD
|
||||||
|
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable "$SERVICE_NAME"
|
||||||
|
sudo systemctl restart "$SERVICE_NAME"
|
||||||
|
log "systemd service $SERVICE_NAME started"
|
||||||
|
|
||||||
|
# ── Caddy reverse proxy ──────────────────────────
|
||||||
|
CADDYFILE="/etc/caddy/Caddyfile"
|
||||||
|
CADDY_SITE_MARK="# worst-scan-web (auto-installed)"
|
||||||
|
|
||||||
|
if grep -q "$CADDY_SITE_MARK" "$CADDYFILE" 2>/dev/null; then
|
||||||
|
warn "Caddy config already contains worst-scan-web block — not modifying"
|
||||||
|
else
|
||||||
|
sudo mkdir -p "$(dirname "$CADDYFILE")"
|
||||||
|
|
||||||
|
if [ -s "$CADDYFILE" ] && [ "$(wc -l < "$CADDYFILE")" -gt 2 ]; then
|
||||||
|
EXISTING_IMPORT=$(grep -c 'import' "$CADDYFILE" 2>/dev/null || true)
|
||||||
|
if [ "$EXISTING_IMPORT" -eq 0 ]; then
|
||||||
|
sudo tee -a "$CADDYFILE" > /dev/null <<CADDY
|
||||||
|
|
||||||
|
$CADDY_SITE_MARK
|
||||||
|
:80 {
|
||||||
|
reverse_proxy 127.0.0.1:3000
|
||||||
|
}
|
||||||
|
CADDY
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
sudo tee "$CADDYFILE" > /dev/null <<CADDY
|
||||||
|
$CADDY_SITE_MARK
|
||||||
|
:80 {
|
||||||
|
reverse_proxy 127.0.0.1:3000
|
||||||
|
}
|
||||||
|
CADDY
|
||||||
|
fi
|
||||||
|
log "Caddy config written"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo systemctl enable caddy 2>/dev/null || true
|
||||||
|
sudo systemctl restart caddy
|
||||||
|
log "Caddy configured"
|
||||||
|
|
||||||
# ── Wait for health ──────────────────────────────
|
# ── Wait for health ──────────────────────────────
|
||||||
info "Waiting for web service to be healthy..."
|
info "Waiting for web service..."
|
||||||
for i in $(seq 1 30); do
|
for i in $(seq 1 15); do
|
||||||
if docker_cmd compose exec -T web wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/api/health &>/dev/null; then
|
if curl -fsS http://127.0.0.1:3000/api/health >/dev/null 2>&1; then
|
||||||
log "Web service is healthy"
|
log "Web service is healthy"; break
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [ "$i" -eq 30 ]; then
|
|
||||||
warn "Timed out waiting for health check — check logs with: docker compose logs web"
|
|
||||||
fi
|
fi
|
||||||
|
if [ "$i" -eq 15 ]; then warn "Timed out — check: journalctl -u $SERVICE_NAME -f"; fi
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
|
|
||||||
# ── Get IP ──────────────────────────────────────
|
# ── IP ──────────────────────────────────────────
|
||||||
IP=$(curl -fsSL http://checkip.amazonaws.com 2>/dev/null || curl -fsSL https://api.ipify.org 2>/dev/null || echo "localhost")
|
IP=$(curl -fsSL http://checkip.amazonaws.com 2>/dev/null || curl -fsSL https://api.ipify.org 2>/dev/null || echo "localhost")
|
||||||
|
|
||||||
# ── Summary ──────────────────────────────────────
|
# ── Summary ──────────────────────────────────────
|
||||||
BOX_W=60
|
BOX_W=58
|
||||||
hr() { printf "║ %-*s ║\n" "$((BOX_W-6))" "$1"; }
|
hr() { printf "║ %-*s ║\n" "$((BOX_W-6))" "$1"; }
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "╔══════════════════════════════════════════════════════════════╗\n"
|
printf "╔══════════════════════════════════════════════════════════════╗\n"
|
||||||
printf "║ ${GREEN}worst-scan-web installed!${NC} ║\n"
|
printf "║ ${GREEN}worst-scan-web installed!${NC} ║\n"
|
||||||
printf "╠══════════════════════════════════════════════════════════════╣\n"
|
printf "╠══════════════════════════════════════════════════════════════╣\n"
|
||||||
hr "Web: http://$IP:3000"
|
hr "Web: http://$IP"
|
||||||
|
hr "Setup: http://$IP/setup"
|
||||||
hr "Config: $INSTALL_DIR/.env"
|
hr "Config: $INSTALL_DIR/.env"
|
||||||
hr "Logs: cd $INSTALL_DIR && docker compose logs -f"
|
hr "Repo: $INSTALL_DIR"
|
||||||
hr "Restart: cd $INSTALL_DIR && docker compose restart"
|
hr ""
|
||||||
hr "Stop: cd $INSTALL_DIR && docker compose down"
|
hr "Manage: sudo systemctl restart $SERVICE_NAME"
|
||||||
hr "Update: bash install.sh"
|
hr "Logs: journalctl -u $SERVICE_NAME -f"
|
||||||
|
hr "Update: cd $INSTALL_DIR && git pull && npm run build"
|
||||||
|
hr " && sudo systemctl restart $SERVICE_NAME"
|
||||||
|
hr ""
|
||||||
|
hr "Caddy: sudo systemctl restart caddy"
|
||||||
|
hr "Cfg: $CADDYFILE"
|
||||||
printf "╚══════════════════════════════════════════════════════════════╝\n"
|
printf "╚══════════════════════════════════════════════════════════════╝\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
info "Next steps:"
|
|
||||||
printf " 1. Open http://%s:3000/setup in your browser\n" "$IP"
|
|
||||||
printf " 2. Complete the web setup wizard\n"
|
|
||||||
printf " 3. Log in and start using worst-scan-web\n"
|
|
||||||
printf "\n"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user