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,28 @@
|
||||
# Full PokeShare stack: the Astro app and its PocketBase backend.
|
||||
# In Coolify, deploy this file as a "Docker Compose" resource.
|
||||
# The `app` service is the one to expose on your public domain.
|
||||
# `pocketbase` stays on the internal network — expose it on a subdomain
|
||||
# only if you want to reach the admin UI (/_/) from outside.
|
||||
services:
|
||||
pocketbase:
|
||||
build: ./pocketbase
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Optional: create/update the admin account on boot (min 8 chars)
|
||||
PB_SUPERUSER_EMAIL: ${PB_SUPERUSER_EMAIL:-}
|
||||
PB_SUPERUSER_PASSWORD: ${PB_SUPERUSER_PASSWORD:-}
|
||||
volumes:
|
||||
- pb_data:/pb/pb_data
|
||||
|
||||
app:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Internal service URL — the browser never talks to PocketBase
|
||||
# directly, everything goes through the Astro server.
|
||||
POCKETBASE_URL: http://pocketbase:8090
|
||||
depends_on:
|
||||
- pocketbase
|
||||
|
||||
volumes:
|
||||
pb_data:
|
||||
Reference in New Issue
Block a user