docker-compose.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # TODO: Revert image tags from feature-react-ui to main before merging to main branch
  2. services:
  3. frontend:
  4. build:
  5. context: ./frontend
  6. dockerfile: Dockerfile
  7. image: ghcr.io/tuanchris/dune-weaver-frontend:feature-react-ui
  8. restart: always
  9. cap_add:
  10. - SYS_NICE # Enable real-time thread priority for smooth UART communication
  11. # ports:
  12. # - "8080:8080" # Map port 8080 of the container to 8080 of the host (access via http://localhost:8080)
  13. network_mode: "host" # Use host network for device access
  14. volumes:
  15. - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
  16. - ./static/dist:/usr/share/nginx/html:ro # Mount local build for dev without rebuild
  17. depends_on:
  18. - backend
  19. container_name: dune-weaver-frontend
  20. backend:
  21. build: .
  22. image: ghcr.io/tuanchris/dune-weaver:feature-react-ui
  23. restart: always
  24. ports:
  25. - "8080:8080"
  26. volumes:
  27. # Mount entire app directory for persistence
  28. - .:/app
  29. # Mount Docker socket for container self-restart/update
  30. - /var/run/docker.sock:/var/run/docker.sock
  31. # Mount timezone file from host for scheduling features
  32. - /etc/timezone:/etc/host-timezone:ro
  33. # Mount systemd for host shutdown capability
  34. - /run/systemd/system:/run/systemd/system:ro
  35. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  36. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  37. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  38. - /sys:/sys
  39. # Mount /dev for serial port access (devices may not exist at start time)
  40. - /dev:/dev
  41. privileged: true
  42. container_name: dune-weaver-backend