docker-compose.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. services:
  2. bambuddy:
  3. image: ghcr.io/maziggy/bambuddy:latest
  4. build: .
  5. # Usage:
  6. # docker compose up -d → pulls pre-built image from ghcr.io
  7. # docker compose up -d --build → builds locally from source
  8. container_name: bambuddy
  9. # Run as current user to avoid permission issues with mounted volumes
  10. # Override with: PUID=$(id -u) PGID=$(id -g) docker compose up -d
  11. user: "${PUID:-1000}:${PGID:-1000}"
  12. #
  13. # Proxy mode: allow binding to port 990 (FTP) as non-root user.
  14. # Without this, the FTP proxy silently fails and sending prints won't work.
  15. cap_add:
  16. - NET_BIND_SERVICE
  17. #
  18. # LINUX: Use host mode for printer discovery and camera streaming
  19. network_mode: host
  20. #
  21. # macOS/WINDOWS: Docker Desktop doesn't support host mode.
  22. # Comment out "network_mode: host" above and uncomment "ports:" below.
  23. # Note: Printer discovery won't work - add printers manually by IP.
  24. #ports:
  25. # - "${PORT:-8000}:8000"
  26. # - "8883:8883" # Virtual printer MQTT
  27. # - "9990:9990" # Virtual printer FTP control
  28. # - "50000-50100:50000-50100" # Virtual printer FTP passive data
  29. volumes:
  30. - bambuddy_data:/app/data
  31. - bambuddy_logs:/app/logs
  32. #
  33. # Share virtual printer certs with native installation
  34. # This ensures the slicer only needs to trust one CA certificate.
  35. - ./virtual_printer:/app/data/virtual_printer
  36. environment:
  37. - TZ=${TZ:-Europe/Berlin}
  38. # Port BamBuddy runs on (default: 8000)
  39. # Usage: PORT=8080 docker compose up -d
  40. - PORT=${PORT:-8000}
  41. # Virtual printer: Set to the Docker host's IP when using bridge mode (ports:).
  42. # Required for FTP passive mode to work behind NAT.
  43. # Example: VIRTUAL_PRINTER_PASV_ADDRESS=192.168.1.100
  44. #- VIRTUAL_PRINTER_PASV_ADDRESS=
  45. restart: unless-stopped
  46. volumes:
  47. bambuddy_data:
  48. bambuddy_logs: