diff --git a/README.md b/README.md index 7aecb21..ce555dd 100644 --- a/README.md +++ b/README.md @@ -216,3 +216,12 @@ the original is in `/etc/postfix/main.cf.before-containers`). Without it every address outside the host's own domains is refused with "Relay access denied", and gdo retries a minute apart until it is. +## Uploads + +Pictures and documents a desk attaches, and what `portal import` brings +in, go to Garage in this project. `go-live.sh garage` renders +`garage/garage.toml` with this node's own rpc secret (gitignored), makes +the bucket `tomtervel-attachments` and the key `tomtervel-portal-uploads`, +and puts `GARAGE_S3_ENDPOINT`, `GARAGE_ACCESS_KEY`, `GARAGE_SECRET_KEY` and +`GARAGE_UPLOADS_BUCKET` in `portal.env`. Without them an upload field +fails closed. Nothing of Garage is published on the host. diff --git a/compose.yml b/compose.yml index a583d1a..f0402a2 100644 --- a/compose.yml +++ b/compose.yml @@ -140,7 +140,20 @@ services: # published 127.0.0.1:4222 port above, so no in-compose runner — and no # docker.sock/podman.sock mount — is needed here. + # Where uploads go: the pictures and documents a desk attaches, and what + # `portal import` brings in. One node on this host, reachable only inside + # the project; nothing is published. go-live.sh garage renders + # garage/garage.toml (gitignored: it holds the node's rpc secret), makes + # the bucket and the key, and puts the four GARAGE_* in portal.env. + garage: + image: docker.io/dxflrs/garage:v2.3.0 + restart: unless-stopped + volumes: + - ./garage/garage.toml:/etc/garage.toml:ro + - garage_data:/var/lib/garage + volumes: + garage_data: caddy_data: caddy_config: nats_data: diff --git a/garage/.gitignore b/garage/.gitignore new file mode 100644 index 0000000..447cb46 --- /dev/null +++ b/garage/.gitignore @@ -0,0 +1,2 @@ +# Rendered on the host by go-live.sh garage; holds the rpc secret. +garage.toml