Docker Compose
Basic setup
nginx runs the shipped contrib/putfs.nginx.conf directly, no inline copy to keep in sync. contrib/ is mounted at /etc/putfs, where the config's includes (keys/, snippets/, cors.nginx.conf) resolve, and contrib/docker/nginx.conf is the http-level wrapper a distro nginx.conf would provide. GET/HEAD are served by nginx (sendfile from /srv/putfs); PUT, DELETE and QUERY are proxied to the api.
Keys live under ./contrib/keys/ (auth.nginx.conf for api keys, presign.nginx.conf for presign secrets), reusable nginx blocks under ./contrib/snippets/. See Auth and Presigned URLs for the formats.
services:
api:
image: ghcr.io/dataresearchcenter/putfs
environment:
PUTFS_ROOT: /data
volumes:
- ./data:/data
- putfs_run:/run/putfs
nginx:
image: nginx:alpine
depends_on:
- api
ports:
- 8000:80
volumes:
- ./data:/srv/putfs:ro
- ./contrib:/etc/putfs:ro
- ./contrib/docker/nginx.conf:/etc/nginx/nginx.conf:ro
- putfs_run:/run/putfs:ro
volumes:
putfs_run:
The Go and Rust builds drop in as overlays: docker compose -f docker-compose.yml -f docker-compose.go.yml up (or .rust.yml) swaps only the api service.