Docker Compose
For getting the most performance out of PutFS, use bare metal deployment via systemd instead.
Basic setup
nginx runs the same contrib/putfs.nginx.conf as a bare-metal deployment – no inline config to keep in sync. The contrib/ directory is mounted at /etc/putfs, where the config's literal includes (keys/, snippets/, cors.nginx.conf) resolve; contrib/docker/nginx.conf provides the http-level wrapper the distro nginx.conf would provide on bare metal. It routes GET/HEAD to nginx itself (sendfile from /srv/putfs) and proxies PUT/DELETE/QUERY listings to the PutFS api.
Keys live under ./contrib/keys/ (auth.nginx.conf for api-key auth, presign.nginx.conf for presigned URL secrets). Reusable nginx blocks live under ./contrib/snippets/. See Auth and Presigned URLs for the file 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: