fix: remove SQLite references from CLAUDE.md (#123) #127
@ -1,6 +1,6 @@
|
||||
# Paper Dynasty Database API
|
||||
|
||||
FastAPI backend for baseball card game data. Peewee ORM with SQLite (WAL mode).
|
||||
FastAPI backend for baseball card game data. Peewee ORM with PostgreSQL.
|
||||
|
||||
## Commands
|
||||
|
||||
@ -14,7 +14,7 @@ docker build -t paper-dynasty-db . # Build image
|
||||
## Architecture
|
||||
|
||||
- **Routers**: Domain-based in `app/routers_v2/` (cards, players, teams, packs, stats, gauntlets, scouting)
|
||||
- **ORM**: Peewee with SQLite (`storage/pd_master.db`, WAL journaling)
|
||||
- **ORM**: Peewee with PostgreSQL
|
||||
- **Card images**: Playwright/Chromium renders HTML templates → screenshots (see `routers_v2/players.py`)
|
||||
- **Logging**: Rotating files in `logs/database/{date}.log`
|
||||
|
||||
@ -42,12 +42,11 @@ docker build -t paper-dynasty-db . # Build image
|
||||
- **API docs**: `/api/docs` and `/api/redoc`
|
||||
|
||||
### Key Env Vars
|
||||
`API_TOKEN`, `LOG_LEVEL`, `DATABASE_TYPE` (sqlite/postgresql), `POSTGRES_HOST`, `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD`
|
||||
`API_TOKEN`, `LOG_LEVEL`, `DATABASE_TYPE`, `POSTGRES_HOST`, `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD`
|
||||
|
||||
### Common Issues
|
||||
- 502 Bad Gateway → API container crashed; check `docker logs pd_api`
|
||||
- Card image generation failures → Playwright/Chromium issue; check for missing dependencies
|
||||
- SQLite locking (dev) → WAL mode should prevent, but check for long-running writes
|
||||
- DB connection errors → verify `POSTGRES_HOST` points to correct container name
|
||||
- **CI/CD**: Gitea Actions on PR to `main` — builds Docker image, auto-generates CalVer version (`YYYY.MM.BUILD`) on merge
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user