8 Commits
Author SHA1 Message Date
Renato 5d36c635cb fix: swap creation + China npm mirror for 1GB VPS
- Creates 1GB swap file before build (prevents OOM on low-RAM VPS)
- Auto-detects China network block on npmjs.org → switches to npmmirror
- deploy/setup.sh: minimal script for pre-built tarball deployment
2026-07-28 01:29:11 +02:00
Renato 4e5a4eda1f fix: npm ci hangs — clean node_modules, add timeout, install build-essential
- rm -rf node_modules before npm ci (clean from aborted runs)
- 420s timeout on npm ci (kills if stuck on native module compilation)
- Install build-essential + python3 for better-sqlite3 native addon
- Exit with clear error if npm ci fails
2026-07-28 00:57:05 +02:00
Renato 8ed9bd83ec fix: skip build if standalone exists; survive SSH drops
- Screen tip added to header
- Skip npm ci + next build if .next/standalone/server.js exists
- Skip systemd service creation if unit exists (restart instead)
- Close else/fi properly for systemd block
- Re-run after SSH drop picks up where it left off
2026-07-28 00:46:20 +02:00
Renato 225bb491a6 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
2026-07-28 00:24:16 +02:00
Renato 958c9cfefc fix: DOCKER_CMD function instead of string for proper arg passing
sg docker -c docker compose expands 'compose' as arg to sg, not docker.
Replaced with bash function docker_cmd() that uses sudo docker as fallback.
This works immediately after usermod without re-login.
2026-07-27 23:34:07 +02:00
Renato ce9223cb65 fix: use Docker convenience script for Ubuntu/Debian
The manual apt repo setup failed because uname -m returns x86_64 but
Docker repo expects amd64 as arch name. Use get.docker.com which
handles arch/codename/GPG correctly. Also added proper arch mapping
(x86_64→amd64, aarch64→arm64) for future use.
2026-07-27 23:31:34 +02:00
Renato 18cee972f5 feat: install.sh auto-installs Docker when missing
- OS detection (ubuntu/debian, arch, fedora, centos/rhel)
- Docker Engine: official repo (apt), pacman, or dnf
- Compose plugin: docker-compose-v2, docker-compose-plugin, or CLI plugin fallback
- Docker daemon auto-start via systemd/service/dockerd
- User added to docker group + sg fallback for current shell
- DOCKER_CMD variable handles sudo vs non-sudo transparently
- Wider summary box (60 chars) for full path display
2026-07-27 23:30:01 +02:00
Renato 0fc421f234 feat: self-contained Docker installer with web setup wizard
- settings.ts: persistent settings.json in data volume (survives restarts)
- /api/setup: POST to save API_BASE_URL, API_KEY, WEB_PASSWORD, WEBHOOK_SECRET
- /setup: web-based setup wizard for first-time configuration
- /api/health: JSON health check endpoint for Docker healthcheck
- api.ts: dynamic API_BASE_URL/API_KEY resolution from settings
- login route: fallback WEB_PASSWORD from settings.json
- middleware: /setup and /api/setup are public paths
- Dockerfile: HEALTHCHECK instruction
- docker-compose.yml: healthcheck + optional .env file
- .env.example: full documentation of all env vars
- install.sh: single-command VPS installer (clone, build, run)
2026-07-27 23:24:57 +02:00