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
+19
View File
@@ -0,0 +1,19 @@
# PocketBase backend with auto-applied migrations (collections + rules).
# Migrations in ./pb_migrations run automatically when the server starts.
FROM alpine:3.21
ARG PB_VERSION=0.39.9
RUN apk add --no-cache ca-certificates curl unzip
WORKDIR /pb
RUN curl -fsSL "https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip" -o pb.zip \
&& unzip pb.zip \
&& rm pb.zip
COPY pb_migrations ./pb_migrations
COPY entrypoint.sh ./
RUN chmod +x entrypoint.sh pocketbase
EXPOSE 8090
CMD ["./entrypoint.sh"]