fix(setup): reduce friction in installation procedure

- Add Language default ("jp") so missing field no longer produces empty
  string, and include language selector in setup wizard
- Add --setup flag to re-run wizard even when config.json exists,
  providing a recovery path for corrupted configs
- Auto-apply seed data on fresh databases so users who skip the wizard
  still get shops, events, and gacha
- Fix stale docs referencing non-existent init/setup.sh and
  schemas/patch-schema/ in docker/README, CONTRIBUTING, and README
This commit is contained in:
Houmgaor
2026-02-23 23:39:49 +01:00
parent 210cfa1fd1
commit bcdc4e0b7e
7 changed files with 67 additions and 39 deletions

View File

@@ -19,7 +19,7 @@
docker compose up
```
The database is automatically initialized and patched on first start via `init/setup.sh`.
The database schema is automatically applied on first start via the embedded migration system.
pgAdmin is available at `http://localhost:5050` (default login: `user@pgadmin.com` / `password`).
@@ -45,18 +45,14 @@ To delete all persistent data, remove these directories after stopping:
## Updating
After pulling new changes:
After pulling new changes, rebuild and restart. Schema migrations are applied automatically on startup.
1. Check for new patch schemas in `schemas/patch-schema/` — apply them via pgAdmin or `psql` into the running database container.
2. Rebuild and restart:
```bash
docker compose down
docker compose build
docker compose up
```
```bash
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.
**Postgres won't start on Windows**: Ensure `docker/db-data/` doesn't contain stale data from a different PostgreSQL version. Delete it and restart to reinitialize.