1
0

docker-compose.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. services:
  2. dune-weaver:
  3. build: . # Uncomment this if you need to build
  4. image: ghcr.io/tuanchris/dune-weaver:main # Use latest production image
  5. restart: always
  6. # ports:
  7. # - "8080:8080" # Map port 8080 of the container to 8080 of the host (access via http://localhost:8080)
  8. network_mode: "host" # Use host network for device access
  9. volumes:
  10. # Mount only persistent data files (not entire app)
  11. - ./state.json:/app/state.json
  12. - ./playlists.json:/app/playlists.json
  13. - ./metadata_cache.json:/app/metadata_cache.json
  14. - ./patterns:/app/patterns
  15. - ./static/custom:/app/static/custom # Custom logo/branding
  16. # Mount Docker socket to allow container to restart itself
  17. - /var/run/docker.sock:/var/run/docker.sock
  18. # Mount timezone file from host for Still Sands scheduling
  19. - /etc/timezone:/etc/host-timezone:ro
  20. # Mount systemd to allow host shutdown
  21. - /run/systemd/system:/run/systemd/system:ro
  22. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  23. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  24. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  25. - /sys:/sys
  26. devices:
  27. - "/dev/ttyACM0:/dev/ttyACM0" # Serial device for stepper motors
  28. - "/dev/ttyUSB0:/dev/ttyUSB0" # Alternative serial device
  29. - "/dev/ttyAMA0:/dev/ttyAMA0" # Alternative serial device
  30. - "/dev/gpiomem:/dev/gpiomem" # GPIO memory access for DW LEDs
  31. - "/dev/mem:/dev/mem" # Direct memory access for PWM
  32. - "/dev/pio0:/dev/pio0" # PIO device for Pi 5 NeoPixel support
  33. privileged: true # Required for GPIO/PWM access
  34. container_name: dune-weaver