Files
worst-scan-web/docker-compose.yml
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

36 lines
782 B
YAML

services:
web:
build: .
container_name: worst-scan-web
expose:
- "3000"
env_file:
- path: .env
required: false
environment:
- API_BASE_URL=${API_BASE_URL:-http://host.docker.internal:8080/api/v1}
- API_KEY=${API_KEY:-}
- WEB_PASSWORD=${WEB_PASSWORD:-}
- WEBHOOK_SECRET=${WEBHOOK_SECRET:-}
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- data:/app/data
networks:
- caddy
- default
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/api/health"]
interval: 30s
timeout: 5s
start_period: 15s
retries: 3
networks:
caddy:
external: true
volumes:
data: