# Leyla on a NAS, a Raspberry Pi or any Docker host, from the published # image. One file for every box: Synology Container Manager, QNAP Container # Station, TerraMaster Docker Manager, OpenMediaVault's compose plugin and # TrueNAS Scale's "Install via YAML" all take it as it is. Change the lines # marked CHANGE; leyla.media/install says what to put on each box. services: leyla: image: tropicalthink/leyla:latest container_name: leyla restart: unless-stopped # The grace period is Leyla's drain plus the database's shutdown # checkpoint. stop_grace_period: 2m environment: # CHANGE: the user and group that own your media: what `id` prints # on the box (a desktop Linux account is usually 1000 and 1000; a # Synology one 1026 and group 100). Leyla runs as this account. PUID: "1000" PGID: "1000" LEYLA__PLAYBACK__DEMAND_SCRATCH_DIR: /run/leyla-playback ports: - "10001:10001" volumes: # Leyla's database, artwork and downloads, beside this file (on a NAS # project, in the project's folder). An SSD volume if the box has one. - ./data:/app/data # Plugins installed from Leyla's store. - ./plugins:/app/plugins # CHANGE: your films and shows, read-only (on a Synology, # /volume1/video). Mount several folders under /media if they live on # different shares (/media/films, /media/tv). - ./media:/media:ro # Playback scratch: in memory, bounded at 1 GB. tmpfs: - /run/leyla-playback:rw,nosuid,nodev,noexec,size=1g,mode=0700 # No memory ceiling. On a box shared with other things, uncomment # this to cap Leyla (a ceiling, not a reservation). # mem_limit: 4g # Hardware transcoding with Intel Quick Sync or AMD (VAAPI), on boxes # that have /dev/dri (most Intel Synology "+" models, QNAP, TerraMaster, # unRAID, an Intel mini PC). Uncomment it on such a box; Leyla joins the # device's group itself. Leave it out on a box without /dev/dri, or the # container will not start. # devices: # - /dev/dri:/dev/dri