fix pb migration

This commit is contained in:
JCEEE
2026-08-10 15:56:03 +01:00
parent e1fb046afd
commit 3085934fb9
7 changed files with 59 additions and 8 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ COPY --from=builder /app/proxy/dist ./proxy
COPY docker/nginx.conf /etc/nginx/http.d/default.conf
COPY docker/entrypoint.sh /entrypoint.sh
ARG POCKETBASE_VERSION=0.25.8
ARG POCKETBASE_VERSION=0.39.10
RUN wget -qO /tmp/pb.zip \
"https://github.com/pocketbase/pocketbase/releases/download/v${POCKETBASE_VERSION}/pocketbase_${POCKETBASE_VERSION}_linux_amd64.zip" \
+2 -2
View File
@@ -1,8 +1,8 @@
FROM alpine:latest
RUN apk add --no-cache curl unzip && \
curl -L -o /tmp/pb.zip https://github.com/pocketbase/pocketbase/releases/download/v0.25.8/pocketbase_0.25.8_linux_amd64.zip && \
curl -L -o /tmp/pb.zip https://github.com/pocketbase/pocketbase/releases/download/v0.39.10/pocketbase_0.39.10_linux_amd64.zip && \
unzip /tmp/pb.zip -d /usr/local/bin/ && \
rm /tmp/pb.zip && \
apk del curl unzip
EXPOSE 8090
CMD ["pocketbase", "serve", "--http=0.0.0.0:8090"]
CMD ["pocketbase", "serve", "--http=0.0.0.0:8090", "--automigrate=false"]
+3 -1
View File
@@ -12,7 +12,9 @@ if [ -n "$PB_EMAIL" ] && [ -n "$PB_PASSWORD" ]; then
fi
# Start PocketBase (internal only; published via loopback for admin UI).
pocketbase serve --http=0.0.0.0:8090 --dir="$PB_DATA" &
# --automigrate=false: we own schema via proxy migrate.ts; PB's built-in
# automigrate generates conflicting snapshots on upgraded stores.
pocketbase serve --http=0.0.0.0:8090 --dir="$PB_DATA" --automigrate=false &
# Wait for PB to be healthy before starting the proxy (which runs migrate).
echo "[entrypoint] Waiting for PocketBase..."