docker-compose.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233
  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. # Mount Docker socket to allow container to restart itself
  16. - /var/run/docker.sock:/var/run/docker.sock
  17. # Mount timezone file from host for Still Sands scheduling
  18. - /etc/timezone:/etc/host-timezone:ro
  19. # Mount systemd to allow host shutdown
  20. - /run/systemd/system:/run/systemd/system:ro
  21. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  22. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  23. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  24. - /sys:/sys
  25. devices:
  26. - "/dev/ttyACM0:/dev/ttyACM0" # Serial device for stepper motors
  27. - "/dev/ttyUSB0:/dev/ttyUSB0" # Alternative serial device
  28. - "/dev/ttyAMA0:/dev/ttyAMA0" # Alternative serial device
  29. - "/dev/gpiomem:/dev/gpiomem" # GPIO memory access for DW LEDs
  30. - "/dev/mem:/dev/mem" # Direct memory access for PWM
  31. - "/dev/pio0:/dev/pio0" # PIO device for Pi 5 NeoPixel support
  32. privileged: true # Required for GPIO/PWM access
  33. container_name: dune-weaver