Replace 4 independent schema management code paths (Docker shell script, setup wizard pg_restore, test helpers, manual psql) with a single migration runner embedded in the server binary. The new server/migrations/ package uses Go embed to bundle all SQL schemas. On startup, Migrate() creates a schema_version tracking table, detects existing databases (auto-marks baseline as applied), and runs pending migrations in transactions. Key changes: - Consolidated init.sql + 9.2-update + 33 patches into 0001_init.sql - Setup wizard simplified to single "Apply schema" checkbox - Test helpers use migrations.Migrate() instead of pg_restore - Docker no longer needs schema volume mounts or init script - Seed data (shops, events, gacha) embedded and applied via API - Future migrations just add 0002_*.sql files — no manual steps
Docker for Erupe
Quick Start
-
From the repository root, copy and edit the config:
cp config.example.json docker/config.jsonEdit
docker/config.json— setDatabase.Hostto"db"and match the password todocker-compose.yml(default:password). -
Place your quest/scenario files in
docker/bin/. -
Start everything:
cd docker docker compose up
The database is automatically initialized and patched on first start via init/setup.sh.
pgAdmin is available at http://localhost:5050 (default login: user@pgadmin.com / password).
Building Locally
By default the server service pulls the prebuilt image from GHCR. To build from source instead, edit docker-compose.yml: comment out the image line and uncomment the build section, then:
docker compose up --build
Stopping the Server
docker compose stop # Stop containers (preserves data)
docker compose down # Stop and remove containers (preserves data volumes)
To delete all persistent data, remove these directories after stopping:
docker/db-data/docker/savedata/
Updating
After pulling new changes:
-
Check for new patch schemas in
schemas/patch-schema/— apply them via pgAdmin orpsqlinto the running database container. -
Rebuild and restart:
docker compose down docker compose build docker compose up
Troubleshooting
Postgres won't populate on Windows: init/setup.sh must use LF line endings, not CRLF. Open it in your editor and convert.