Commit Graph
6 Commits
Author SHA1 Message Date
DorianandClaude Fable 5 0511b97cb9 feat(09-01): arena-proxy survives SSE, client-IP forwarding, upstream-down
CI / check (push) Has been cancelled
- Forward client IP via x-forwarded-for/x-real-ip so the canonical arena's
  per-IP rate limiting isn't collapsed to one bucket per node.
- 30s AbortSignal.timeout on non-stream requests; SSE fight streams
  (/api/fights/:id/stream) are exempt (long-lived by design).
- On upstream fetch failure, log and return 502 {error} instead of a
  buffered hang or a 500 stack trace.
- fights.ts: set X-Accel-Buffering: no on the SSE stream response so an
  nginx-fronted arena (nginx-proxy-manager) doesn't buffer live fight events.
- docker-compose.yml: document ARENA_UPSTREAM_URL / TRUSTED_PROXY (commented,
  no active value set here — the canonical arena gets its own compose file
  in a later plan).

TDD: added the SSE/XFF/502 tests, confirmed the 502 test failed against the
prior implementation, then implemented to green (9/9 arena-proxy tests,
17/17 combined with rate-limit.test.ts).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 21:32:57 -04:00
DorianandClaude Opus 4.6 a571ff4b98 fix: add JWT_SECRET and CREATOR_PUBKEYS to docker-compose env
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 16:04:27 +00:00
DorianandClaude Opus 4.6 834be596ba fix: add cache-bust build arg to force Docker rebuild on deploy
Portainer stack updates were serving stale cached Docker layers.
Added CACHE_BUST ARG so each deploy can force a fresh build.
Set CACHE_BUST env var in Portainer to current timestamp to trigger.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 08:38:02 +00:00
DorianandClaude Opus 4.6 abe4efe760 feat: Creator human companion — deep hood, detailed Guy Fawkes mask, cloak, gloves
- Rewrote Creator human sprite: taller hood peak, face-framing shadows,
  neck-to-cloak coverage, wider flowing cloak with hem detail, 6 matrix
  code streams, dramatic arched brows, 3px golden eye slits with glow,
  wider curled mustache, wider smile arc, extended goatee, larger Bitcoin
  emblem with serifs, laptop with terminal glow + coach sparks, dark
  gloves covering skin, 6-particle gold orbit, 8-particle shadow aura
- docker-compose: pass wallet/payment env vars from Portainer
- JoinBoutPage: fix isLoading ref access bug, add max 12-char name validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 14:30:31 +00:00
DorianandClaude Opus 4.6 3e74712c44 feat: production hardening — background fights, queue tuning, CORS, cycling taglines
- Background fight loop: mock bots auto-fight every ~45s for site activity
  - Quiet hours (2-8 UTC) run 4x slower, jitter prevents robotic timing
  - Configurable via FIGHT_LOOP_ENABLED, FIGHT_LOOP_INTERVAL_MS
- Queue timeout: 30s in prod (was 3s), configurable via QUEUE_TIMEOUT_MS
- CORS: env-configurable via CORS_ORIGIN (default '*')
- Homepage: 40 cycling taglines with typewriter effect
- docker-compose: document all new env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:04:32 +00:00
DorianandClaude Opus 4.6 6bf9fe27b3 feat: production deployment — Dockerfile, docker-compose, SPA serving, classic bot fights
- Add Dockerfile (multi-stage: build frontend + server, serve from single container)
- Add docker-compose.yml for Portainer stack deployment
- Server serves frontend SPA in production (static assets + SPA fallback)
- Auto-run migrations and seed mock bots on server startup
- DB path configurable via DB_PATH env var
- Add "Fight a Classic Bot" button for instant mock bot matches
- FIGHT button queues for real AI opponents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 10:42:18 +00:00