- FastAPI backend: admin bootstrap with forced credential change, admin-created users with one-time generated passwords, roles as permission sets - Games and versions with content-addressed blob storage; forks copy only the manifest, so mods share assets with the original - Worker: archive/RPA extraction, unrpyc for .rpyc, own .rpy parser, Python subset translated via ast, media converted to WebP/Opus/WebM - React panel (library search, game page, upload, users, roles) and a framework-free web player with saves, history, skip/auto, transitions - docker compose: postgres, backend, worker, nginx on a single HTTP port Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: pgames
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pgames}
|
|
POSTGRES_DB: pgames
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U pgames"]
|
|
interval: 5s
|
|
retries: 20
|
|
|
|
backend:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://pgames:${POSTGRES_PASSWORD:-pgames}@db:5432/pgames
|
|
DATA_DIR: /data
|
|
volumes:
|
|
- ${DATA_PATH:-./data}:/data
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
|
|
interval: 5s
|
|
retries: 30
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
worker:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
command: ["python", "-m", "app.worker"]
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://pgames:${POSTGRES_PASSWORD:-pgames}@db:5432/pgames
|
|
DATA_DIR: /data
|
|
volumes:
|
|
- ${DATA_PATH:-./data}:/data
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy # migrations are applied by backend
|
|
|
|
web:
|
|
build: ./frontend
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${HTTP_PORT:-8080}:80"
|
|
volumes:
|
|
- ${DATA_PATH:-./data}:/data:ro
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
db:
|