| 12345678910111213141516171819202122232425262728293031 |
- services:
- dune-weaver:
- build: . # Uncomment this if you need to build
- image: ghcr.io/tuanchris/dune-weaver:main # Use latest production image
- restart: always
- cap_add:
- - SYS_NICE # Enable real-time thread priority for smooth UART communication
- # ports:
- # - "8080:8080" # Map port 8080 of the container to 8080 of the host (access via http://localhost:8080)
- network_mode: "host" # Use host network for device access
- volumes:
- - .:/app # Mount entire app for development
- # Mount Docker socket to allow container to restart itself
- - /var/run/docker.sock:/var/run/docker.sock
- # Mount timezone file from host for Still Sands scheduling
- - /etc/timezone:/etc/host-timezone:ro
- # Mount systemd to allow host shutdown
- - /run/systemd/system:/run/systemd/system:ro
- - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
- - /sys/fs/cgroup:/sys/fs/cgroup:ro
- # Mount GPIO for DW LEDs and Desert Compass (reed switch)
- - /sys:/sys
- devices:
- - "/dev/ttyACM0:/dev/ttyACM0" # Serial device for stepper motors
- - "/dev/ttyUSB0:/dev/ttyUSB0" # Alternative serial device
- - "/dev/ttyAMA0:/dev/ttyAMA0" # Alternative serial device
- - "/dev/gpiomem:/dev/gpiomem" # GPIO memory access for DW LEDs
- - "/dev/mem:/dev/mem" # Direct memory access for PWM
- - "/dev/pio0:/dev/pio0" # PIO device for Pi 5 NeoPixel support
- privileged: true # Required for GPIO/PWM access
- container_name: dune-weaver
|