Store public uploads in a Garage S3 bucket, with garage-webui at /garage/
Opt-in and built so Garage can never take the site down: - the backend writes to the bucket only once S3_ENDPOINT is set, and falls back to the uploads volume (with a log line) if a write fails; - nginx serves /uploads/ from the volume first and Garage's anonymous website endpoint second, so every existing URL keeps working and nginx boots with no garage container; - nothing depends_on garage and no variable is required, so a missing secret cannot fail a deploy. Private attachments stay on disk, since nginx cannot gate a bucket. garage/bootstrap.sh sets up the layout, bucket, key and website access; the runbook is "Garage" in DEPLOYMENT.md. Also lifts the body limit on the internal auth subrequest, which 413'd large uploads to gated locations, and reserves the garage and dozzle page slugs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -253,3 +253,31 @@ TRACKER_TZ=Europe/London
|
||||
|
||||
# TfL Unified API key (500 req/min); used by the Python hotel finder
|
||||
TFL_APP_KEY=
|
||||
|
||||
# --- Garage object store (public /uploads/) -----------------------------------
|
||||
# See garage/garage.toml and DEPLOYMENT.md ("Garage"). Everything here is
|
||||
# optional for the site to run: with S3_ENDPOINT blank the backend keeps
|
||||
# writing uploads to the `uploads` volume exactly as before.
|
||||
#
|
||||
# Garage's own secrets, passed to the garage and garage-webui containers.
|
||||
# Generate each with `openssl rand -hex 32`. The RPC secret must never change
|
||||
# once the node has data; the admin token unlocks garage-webui's whole API.
|
||||
GARAGE_RPC_SECRET=
|
||||
GARAGE_ADMIN_TOKEN=
|
||||
# The backend's S3 access, imported into Garage by garage/bootstrap.sh.
|
||||
# Garage only accepts this shape:
|
||||
# S3_ACCESS_KEY_ID "GK" + 24 hex (echo GK$(openssl rand -hex 12))
|
||||
# S3_SECRET_ACCESS_KEY 64 hex (openssl rand -hex 32)
|
||||
S3_ACCESS_KEY_ID=
|
||||
S3_SECRET_ACCESS_KEY=
|
||||
# Blank keeps uploads on disk. Set to http://garage:3900 (after running
|
||||
# garage/bootstrap.sh) to store new public uploads in the bucket; recreate the
|
||||
# backend after changing it. If a write to Garage fails the backend logs it and
|
||||
# writes to disk instead, and nginx serves the file from there.
|
||||
S3_ENDPOINT=
|
||||
# Optional; these defaults match garage.toml and bootstrap.sh.
|
||||
S3_REGION=garage
|
||||
S3_BUCKET=uploads
|
||||
# Optional, bootstrap.sh only: the node's capacity in the layout. With one node
|
||||
# it only has to be non-zero; it is not a quota. Default 20G.
|
||||
GARAGE_CAPACITY=
|
||||
|
||||
Reference in New Issue
Block a user