docker-compose.yml 1.3 KB

123456789101112131415161718192021222324252627282930
  1. services:
  2. dune-weaver:
  3. build: .
  4. image: ghcr.io/tuanchris/dune-weaver:main
  5. restart: always
  6. ports:
  7. - "80:80" # Frontend (nginx)
  8. - "8080:8080" # Backend API
  9. volumes:
  10. # Mount entire app directory for development
  11. - .:/app
  12. # Mount Docker socket for container self-restart/update
  13. - /var/run/docker.sock:/var/run/docker.sock
  14. # Mount timezone file from host for scheduling features
  15. - /etc/timezone:/etc/host-timezone:ro
  16. # Mount systemd for host shutdown capability
  17. - /run/systemd/system:/run/systemd/system:ro
  18. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  19. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  20. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  21. - /sys:/sys
  22. devices:
  23. - "/dev/ttyACM0:/dev/ttyACM0" # Serial device for stepper motors
  24. - "/dev/ttyUSB0:/dev/ttyUSB0" # Alternative serial device
  25. - "/dev/ttyAMA0:/dev/ttyAMA0" # Alternative serial device
  26. - "/dev/gpiomem:/dev/gpiomem" # GPIO memory access for DW LEDs
  27. - "/dev/mem:/dev/mem" # Direct memory access for PWM
  28. - "/dev/pio0:/dev/pio0" # PIO device for Pi 5 NeoPixel support
  29. privileged: true # Required for GPIO/PWM access
  30. container_name: dune-weaver