Add self-hosted PocketBase stack with auto-migrations

- docker-compose.yml: app + pocketbase services (PB internal to the network)
- pocketbase/: pinned PocketBase image, superuser bootstrap via env vars
- pb_migrations: production schema (collections, rules, public_users view)
  applied automatically on first boot
- pocketbase/pb_schema.json: schema export kept as reference
- README: full-stack deployment docs
This commit is contained in:
2026-07-28 09:38:07 +02:00
parent c3c1f5e216
commit 3d712b8c57
6 changed files with 550 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -e
# Optionally create/update the admin (superuser) account on boot.
# Set PB_SUPERUSER_EMAIL and PB_SUPERUSER_PASSWORD as env vars to enable.
# The password must be at least 8 characters.
if [ -n "$PB_SUPERUSER_EMAIL" ] && [ -n "$PB_SUPERUSER_PASSWORD" ]; then
./pocketbase superuser upsert "$PB_SUPERUSER_EMAIL" "$PB_SUPERUSER_PASSWORD" || true
fi
# `serve` automatically applies pending migrations from ./pb_migrations
exec ./pocketbase serve --http=0.0.0.0:8090