rewrite: TS monorepo — pi SDK stateless agents, Postgres+pg-boss, SvelteKit themed UI; legacy moved to legacy/
This commit is contained in:
+34
-17
@@ -1,31 +1,48 @@
|
||||
# Deploy: docker compose up -d --build (on serv, in /opt/chessai)
|
||||
# The app talks to cli-proxy-api directly over caddy-network (no public hop, no RKN).
|
||||
services:
|
||||
db:
|
||||
image: postgres:17-alpine
|
||||
container_name: chessai-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: chess
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-chess}
|
||||
POSTGRES_DB: chess
|
||||
volumes:
|
||||
- ./pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U chess"]
|
||||
interval: 5s
|
||||
retries: 20
|
||||
|
||||
chessai:
|
||||
build: .
|
||||
build:
|
||||
context: .
|
||||
network: host
|
||||
args:
|
||||
http_proxy: ${BUILD_PROXY:-}
|
||||
https_proxy: ${BUILD_PROXY:-}
|
||||
HTTP_PROXY: ${BUILD_PROXY:-}
|
||||
HTTPS_PROXY: ${BUILD_PROXY:-}
|
||||
image: chessai:latest
|
||||
container_name: chessai
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
env_file: .env
|
||||
environment:
|
||||
AI_CHESS_HOST: "0.0.0.0" # listen on all interfaces inside the container
|
||||
AI_CHESS_PORT: "7833"
|
||||
# claude-code auth — talks to user's machka gateway, no Anthropic
|
||||
# subscription needed at runtime.
|
||||
ANTHROPIC_BASE_URL: "${ANTHROPIC_BASE_URL:-https://claude.machka.dev}"
|
||||
ANTHROPIC_AUTH_TOKEN: "${ANTHROPIC_AUTH_TOKEN}"
|
||||
DATABASE_URL: postgres://chess:${POSTGRES_PASSWORD:-chess}@db:5432/chess
|
||||
HOST: 0.0.0.0
|
||||
PORT: "7833"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
networks:
|
||||
default:
|
||||
caddy-network:
|
||||
aliases:
|
||||
- chessai
|
||||
volumes:
|
||||
# Persistent runtime data — survives container rebuilds.
|
||||
- ./games:/app/games
|
||||
- ./logs:/app/logs
|
||||
- ./config:/app/config
|
||||
# codex config + auth lives in /opt/chessai/secrets/codex on the host
|
||||
# and is mapped into the container's $CODEX_HOME (= ~/.codex by default).
|
||||
# codex writes its own session/history/logs inside ~/.codex, so the
|
||||
# mount has to be rw — the auth.json itself is never rewritten.
|
||||
- ./secrets/codex:/home/chess/.codex
|
||||
|
||||
networks:
|
||||
caddy-network:
|
||||
|
||||
Reference in New Issue
Block a user