Implement ChessUp server, vanilla TS UI, Stockfish analytics, and Docker/Cloudflared setup

This commit is contained in:
tyuXX 2026-11-22 18:18:15 +03:00
commit e2e085b341
52 changed files with 15730 additions and 0 deletions

58
docker-compose.yml Normal file
View file

@ -0,0 +1,58 @@
# ChessUp + Cloudflare Tunnel (zero host ports exposed)
#
# In the Cloudflare Zero Trust dashboard (Networks -> Tunnels -> Public Hostname),
# point your domain's Public Hostname to:
# Service Type: HTTP
# URL: chessup:3000
services:
chessup:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
environment:
NODE_ENV: production
PORT: "3000"
HOST: "0.0.0.0"
DB_PATH: /app/data/chessup.db
COOKIE_SECURE: ${COOKIE_SECURE:-1}
STOCKFISH_WORKERS: ${STOCKFISH_WORKERS:-2}
ANALYSIS_DEPTH: ${ANALYSIS_DEPTH:-12}
MULTIPV_DEPTH: ${MULTIPV_DEPTH:-14}
DISCONNECT_FORFEIT_MS: ${DISCONNECT_FORFEIT_MS:-60000}
volumes:
- chessup_data:/app/data
networks:
- chessup_bridge
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/api/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
cloudflared:
image: cloudflare/cloudflared:latest
restart: unless-stopped
command: tunnel --no-autoupdate run
environment:
TUNNEL_TOKEN: ${CLOUDFLARED_TOKEN:?Set CLOUDFLARED_TOKEN in .env}
depends_on:
chessup:
condition: service_healthy
networks:
- chessup_bridge
networks:
chessup_bridge:
driver: bridge
volumes:
chessup_data: