services: satchel: build: . image: satchel:local container_name: satchel restart: unless-stopped env_file: .env environment: # The owner of the files in ./data: run `id` on the host and use your own ids. PUID: ${PUID:-1000} PGID: ${PGID:-1000} # Read from a secret instead of .env. SATCHEL_TOKEN must then be unset in .env. # SATCHEL_TOKEN_FILE: /run/secrets/satchel_token ports: # Loopback only. Reach it from other machines through a tunnel or reverse proxy. - "127.0.0.1:8787:8787" volumes: # Your memories, and the only thing to back up. A bind mount, easy to copy and to # edit by hand; the entrypoint makes it owned by PUID:PGID. - ${SATCHEL_DATA_DIR:-./data}:/data # The embedding model cache. It re-downloads if lost, so it lives in a named volume # outside the backup. - satchel-models:/models # secrets: # - satchel_token # Simplest tunnel: a cloudflared sidecar. Create a tunnel in Zero Trust, add a public # hostname pointing at http://satchel:8787, and put the tunnel token in .env. # Not needed if the host already runs cloudflared or another reverse proxy. # cloudflared: # image: cloudflare/cloudflared:latest # pin a version in real use # restart: unless-stopped # command: tunnel --no-autoupdate run # environment: # TUNNEL_TOKEN: ${CLOUDFLARE_TUNNEL_TOKEN} # depends_on: # - satchel volumes: satchel-models: # secrets: # satchel_token: # file: ./secrets/satchel_token