--- title: "Paper Dynasty Dev Server Guide" description: "Setup guide for Paper Dynasty local development server with Docker Compose, database seeding, and hot-reload configuration." type: guide domain: development tags: [paper-dynasty, docker, development, setup] --- # Paper Dynasty Dev Server Guide ## Prerequisites - Docker with Compose v2 - Git access to `cal/paper-dynasty` and `cal/paper-dynasty-database` - `.env` file from the project wiki or another dev ## Quick Start ```bash cd /mnt/NV2/Development/paper-dynasty cp .env.example .env # then fill in DB creds and Discord token docker compose -f docker-compose.dev.yml up -d ``` ## Services | Service | Port | Purpose | |---------|------|---------| | `api` | 8080 | FastAPI backend (hot-reload enabled) | | `db` | 5432 | PostgreSQL 16 | | `bot` | — | Discord bot (connects to dev guild) | ## Database Seeding ```bash docker compose exec api python -m scripts.seed_dev_data ``` This creates 5 test players with pre-built collections for testing trades and gauntlet. ## Common Issues - **Bot won't connect**: Check `DISCORD_TOKEN` in `.env` points to the dev bot, not prod - **DB connection refused**: Wait 10s for postgres healthcheck, or `docker compose restart db`