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:
@@ -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
|
||||
Reference in New Issue
Block a user