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:
Renato
2026-07-28 00:24:16 +02:00
parent 958c9cfefc
commit 225bb491a6
3 changed files with 192 additions and 148 deletions
+7
View File
@@ -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
}
+19
View File
@@ -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