docker-compose.yml 1.4 KB

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