1
0

docker-compose.yml 1.3 KB

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