- pb_hooks/main.pb.js: bootstrap hook applying SMTP + meta settings from env vars on every boot (mail disabled when SMTP_HOST is unset) - docker-compose.yml: expose SMTP_* / PB_APP_URL on the pocketbase service - pocketbase/Dockerfile: bundle pb_hooks - README: document the new variables
21 lines
592 B
Docker
21 lines
592 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 pb_hooks ./pb_hooks
|
|
COPY entrypoint.sh ./
|
|
RUN chmod +x entrypoint.sh pocketbase
|
|
|
|
EXPOSE 8090
|
|
CMD ["./entrypoint.sh"]
|