docker-compose.yml 809 B

1234567891011121314151617181920212223242526272829303132333435
  1. version: '2.3'
  2. volumes:
  3. cache:
  4. services:
  5. librespot:
  6. build: .
  7. image: docker.io/fphammerle/librespot
  8. group_add: [29] # stat --format='%g %n' /dev/snd/*
  9. command: librespot
  10. --cache /var/cache/librespot
  11. --name librespot-docker-compose-test
  12. --device-type computer
  13. --verbose
  14. --backend alsa
  15. --device surround21
  16. --enable-volume-normalisation
  17. --volume-ctrl linear
  18. --initial-volume 25
  19. read_only: yes
  20. volumes:
  21. - type: volume
  22. source: cache
  23. target: /var/cache/librespot # $LIBRESPOT_CACHE_PATH
  24. devices:
  25. - /dev/snd
  26. userns_mode: host
  27. network_mode: host
  28. cap_drop: [all]
  29. security_opt: [no-new-privileges]
  30. cpus: 0.4
  31. mem_limit: 32M
  32. # https://docs.docker.com/compose/compose-file/compose-file-v2/