- 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
20 lines
567 B
Docker
20 lines
567 B
Docker
# 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"]
|