2026-07-30 21:22:21 -04:00
|
|
|
# docker-compose.arena.yml — the CANONICAL public BotFights arena
|
|
|
|
|
#
|
|
|
|
|
# This is the counterpart to docker-compose.yml (the local/dev stack). It runs
|
|
|
|
|
# ONLY the published registry image (no `build:` section — the arena runs exactly
|
|
|
|
|
# what nodes run, never a locally-built variant), with payments deliberately
|
|
|
|
|
# unconfigured and no reverse proxy in front (direct exposure on :9100, so the
|
|
|
|
|
# app's own rate limiter must see the real socket peer IP — see TRUSTED_PROXY note
|
|
|
|
|
# below).
|
|
|
|
|
#
|
|
|
|
|
# Deploy notes live in docs/arena-deployment.md — this file has no secrets. The
|
|
|
|
|
# JWT_SECRET value is generated on the host into /opt/botfights-arena/.env (0600,
|
|
|
|
|
# never committed).
|
|
|
|
|
#
|
|
|
|
|
# Arena-as-relay: this compose file is not special — it is the SAME image any
|
|
|
|
|
# node can run standalone (no ARENA_UPSTREAM_URL) to host its own public arena.
|
|
|
|
|
# The Foundation's VPS2 instance below is just the well-known default rendezvous,
|
|
|
|
|
# not a hardcoded authority. See docs/arena-deployment.md "Hosting your own arena".
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
botfights-arena:
|
|
|
|
|
image: localhost:3000/lfg2025/botfights:1.1.0
|
|
|
|
|
container_name: botfights-arena
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
|
|
|
|
- "9100:9100"
|
|
|
|
|
volumes:
|
|
|
|
|
- botfights-arena-data:/app/server/data
|
|
|
|
|
# Explicit override (not just relying on the image's baked-in HEALTHCHECK):
|
|
|
|
|
# the currently published 1.1.0 tag predates the Dockerfile's HEALTHCHECK
|
|
|
|
|
# directive, so `docker ps` shows no health status without this.
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "node", "-e", "fetch('http://localhost:9100/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
start_period: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
environment:
|
|
|
|
|
- NODE_ENV=production
|
|
|
|
|
- PORT=9100
|
|
|
|
|
- FIGHT_LOOP_ENABLED=true
|
2026-07-30 21:44:10 -04:00
|
|
|
- PUBLIC_ARENA_URL=https://botfights.archipelago-foundation.org
|
|
|
|
|
- TRUSTED_PROXY=1
|
2026-07-30 21:22:21 -04:00
|
|
|
# Auth — value comes from the host .env, never hardcoded here.
|
|
|
|
|
# Generated on VPS2 with: openssl rand -hex 32 (see docs/arena-deployment.md)
|
|
|
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
|
|
|
# Deliberately OMITTED: TRUSTED_PROXY
|
|
|
|
|
# No NPM/reverse-proxy sits in front of this instance (plain HTTP on the
|
|
|
|
|
# raw port, user decision 2026-07-30 — no DNS/TLS this phase). Clients hit
|
|
|
|
|
# :9100 directly, so the app's rate-limit middleware must key off the real
|
|
|
|
|
# TCP socket peer IP, not a forwarded header a direct caller could forge.
|
|
|
|
|
- BOTFIGHTS_CREATOR_PUBKEYS=${BOTFIGHTS_CREATOR_PUBKEYS:-da5e0c1b646bdb13c2300f805b0ca3e5afe5b052c594ce78bac8978d21c3fa39}
|
|
|
|
|
# Deliberately OMITTED: this instance IS the upstream — never point it at
|
|
|
|
|
# another arena.
|
|
|
|
|
# - ARENA_UPSTREAM_URL=
|
|
|
|
|
# ── Payments are OUT OF SCOPE for this deployment (phase 09 CONTEXT.md
|
|
|
|
|
# scope fence: "OUT: Lightning/cashu payment changes"). Do not set:
|
|
|
|
|
# - BOTFIGHTS_WALLET_ENCRYPTION_KEY=
|
|
|
|
|
# - BOTFIGHTS_NWC_URL=
|
|
|
|
|
# - BOTFIGHTS_CASHU_MINT_URL=
|
|
|
|
|
# - BOTFIGHTS_DEV_PAYOUT_LNADDRESS=
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
botfights-arena-data:
|