services: app: image: ghcr.io/vavallee/bindery:${BINDERY_VERSION:-latest} container_name: bindery-app # Image is distroless and can't switch users at runtime — this UID:GID must own the NFS export and bind mount paths user: "${BINDERY_UID:-1000}:${BINDERY_GID:-1000}" environment: - TZ=${BINDERY_TZ:-America/Los_Angeles} - BINDERY_LOG_LEVEL=${BINDERY_LOG_LEVEL:-info} # /data matches Transmission's container path so its reported download paths resolve without a remap - BINDERY_DOWNLOAD_DIR=/data - BINDERY_AUDIOBOOK_DIR=/audiobooks ports: - ${BINDERY_PORT:-8787}:8787 volumes: - bindery-config:/config - ${BINDERY_BOOKS}:/books - ${BINDERY_AUDIOBOOKS}:/audiobooks - ${BINDERY_DOWNLOADS}:/data # No shell/curl in the distroless image — test is inherited from the image's built-in # HEALTHCHECK (runs the binary's healthcheck subcommand against /api/v1/health) healthcheck: interval: 30s timeout: 10s retries: 5 start_period: 30s deploy: resources: limits: memory: 512M restart: unless-stopped volumes: bindery-config: name: bindery-config driver: local driver_opts: type: nfs o: "addr=${BINDERY_NFS_SERVER},rw,noatime,rsize=65536,wsize=65536,timeo=600,nfsvers=4" device: "${BINDERY_NFS_DEVICE}"