archivist: migrate to PocketBase v0.41.1 (module ganigeorgiev.com/pocketbase/pocketbase); dbx moved to ganigeorgiev.com/pocketbase/dbx; go 1.27 and golang:1.27-alpine builder

This commit is contained in:
2026-11-03 21:01:00 +01:00
parent 7829d73cd4
commit 6f94674fc9
7 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ Everything runs offline on the server infrastructure: no cloud APIs, no outbound
| Component | Choice |
|---|---|
| Framework / runtime | PocketBase (Go framework, single binary) |
| Framework / runtime | PocketBase v0.41.1 (Go framework, single binary; module `ganigeorgiev.com/pocketbase/pocketbase`) |
| Language | Go |
| Scheduling | `app.Cron()` (S3 poller, periodic tasks) |
| S3 | MinIO Go SDK (`github.com/minio/minio-go/v7`) |
@@ -261,7 +261,7 @@ The gate is a regression detector for dependency upgrades (PocketBase, minio-go,
`Dockerfile`, two-stage build:
- Builder: `golang:1.23-alpine`, CGO disabled, static binary, `TARGETARCH` honored for multi-platform builds under buildx. `go mod tidy` runs there because `go.sum` is not committed; once it is committed, the line becomes `go mod download` for fully reproducible builds.
- Builder: `golang:1.27-alpine` (matches the `go 1.27` directive of PocketBase v0.41.1), CGO disabled, static binary, `TARGETARCH` honored for multi-platform builds under buildx. `go mod tidy` runs there because `go.sum` is not committed; once it is committed, the line becomes `go mod download` for fully reproducible builds.
- Runtime: `scratch` with only the `/archivist` binary, the CA bundle (the S3 endpoint is HTTPS by default), the timezone database (the cron and date rendering honor `TZ`), and `/app/pb_data` + `/tmp`, the only writable directories, owned by the unprivileged runtime user 65532. `config.jsonc` is never baked in: it is mounted at runtime, `ARCHIVIST_CONFIG` defaulting to `config.jsonc` relative to `/app`.
The container runs as 65532:65532 (non-root), exposes 8090, declares `/app/pb_data` as a volume, and has no shell: `docker exec` is not available. `.dockerignore` keeps the build context to the Go sources; the E2E harness is not part of the image.