Adds a custom PocketBase binary (cmd/pocketbase) that embeds PocketBase as a Go framework with version-controlled migrations, replacing the fragile 419-line shell script. Migrations apply automatically on every `serve` startup. Migration 1 (20260414000001): full baseline schema — all 21 collections, both indexes on chapters_idx, and initial superuser creation from env vars. Migration 2 (20260414000002): adds three fields found in code but missing from the old script — books.rating, app_users.notify_new_chapters_push, book_comments.chapter. docker-compose: pocketbase service now uses the custom kalekber/libnovel-pocketbase image; pb-init one-shot container removed (migrations replace it entirely). Existing installs: run `migrate history-sync` once to mark migration 1 as done, then restart — migration 2 will apply the three previously missing fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4.5 KiB
4.5 KiB