Database Service¶
PostgreSQL stores the persistent data used by the API, bot, and website.
Purpose¶
This database stores user data, map metadata, run results, and other records shared across services.
Compose configuration¶
The database is defined in:
docker-compose.local.ymlaspostgres-local(for local development)docker-compose.dev.ymlasgenjishimada-db-dev(for remote staging)docker-compose.prod.ymlasgenjishimada-db(for remote production)
Local Development¶
- Uses the
postgres:17image - Exposes port
5432on127.0.0.1 - Includes health checks via
pg_isready - Simple credentials (genji/local_dev_password)
Remote Staging¶
- Uses the
postgres:17image - Exposes port
65432on127.0.0.1 - Includes health checks via
pg_isready
Remote Production¶
- Uses the
postgres:17image - Exposes port
55432on127.0.0.1 - Includes health checks via
pg_isready
Environment variables¶
| Variable | Description |
|---|---|
POSTGRES_USER |
Username for the database |
POSTGRES_PASSWORD |
Password for the database |
POSTGRES_DB |
Name of the primary database |
Local development¶
-
Start local infrastructure:
-
Connect to the database:
- Host:
localhost - Port:
5432 - User:
genji - Password:
local_dev_password -
Database:
genjishimada -
Or use the container directly:
See the Quick Start Guide for full local development setup.