docker-compose.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Optional slicer-API sidecar stack for Bambuddy.
  2. #
  3. # Both services are HTTP wrappers around a slicer CLI: the same Node code
  4. # (`maziggy/orca-slicer-api`, `bambuddy/profile-resolver` branch) bundled
  5. # with a different binary in each image. Bambuddy talks to them via the
  6. # URLs configured in Settings -> Slicer.
  7. #
  8. # bambu-studio-api → host port 3001 (BambuStudio CLI)
  9. # orca-slicer-api → host port 3003 (OrcaSlicer CLI)
  10. #
  11. # Bambuddy's virtual-printer feature reserves host ports 3000 and 3002,
  12. # which is why the OrcaSlicer sidecar sits on 3003. Override either port
  13. # in `.env` (see `.env.example`) if you don't run Bambuddy on this host.
  14. #
  15. # Usage:
  16. # cd slicer-api/
  17. # docker compose up -d # starts OrcaSlicer only
  18. # docker compose --profile bambu up -d # starts both
  19. #
  20. # Updating: `docker compose pull` skips profile-gated services, so a bare
  21. # pull silently leaves bambu-studio-api on its old image (and restart:
  22. # unless-stopped keeps it serving). Use `docker compose --profile bambu pull`,
  23. # or name the service: `docker compose pull bambu-studio-api`.
  24. #
  25. # First start pulls pre-built images from GHCR (~110 MB OrcaSlicer,
  26. # ~220 MB BambuStudio). No local build, no git in the BuildKit worker,
  27. # works on QNAP / Synology / Container Station out of the box.
  28. #
  29. # Both images are linux/amd64 only. OrcaSlicer's ARM64 path is on hold
  30. # pending an upstream extraction fix; BambuStudio doesn't publish ARM64
  31. # at all. ARM64 hosts are best served by running the sidecar on a separate
  32. # x86_64 box; failing that, `docker-compose.arm64.yml` in this directory
  33. # runs these same images under QEMU emulation — experimental, ~3-6x slower,
  34. # and it needs binfmt set up on the host. See the README.
  35. services:
  36. orca-slicer-api:
  37. image: ghcr.io/maziggy/orca-slicer-api:${SIDECAR_TAG:-latest}
  38. container_name: orca-slicer-api
  39. restart: unless-stopped
  40. ports:
  41. - "${ORCA_API_PORT:-3003}:3000"
  42. volumes:
  43. - ./data/orca:/app/data
  44. environment:
  45. NODE_ENV: production
  46. PORT: "3000"
  47. # Largest model accepted for a slice, in MB. See .env.example.
  48. MAX_MODEL_UPLOAD_MB: "${MAX_MODEL_UPLOAD_MB:-512}"
  49. healthcheck:
  50. test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
  51. interval: 30s
  52. timeout: 5s
  53. start_period: 10s
  54. retries: 3
  55. bambu-studio-api:
  56. image: ghcr.io/maziggy/bambu-studio-api:${SIDECAR_TAG:-latest}
  57. container_name: bambu-studio-api
  58. restart: unless-stopped
  59. ports:
  60. - "${BAMBU_API_PORT:-3001}:3000"
  61. volumes:
  62. - ./data/bambu:/app/data
  63. environment:
  64. NODE_ENV: production
  65. PORT: "3000"
  66. # Largest model accepted for a slice, in MB. See .env.example.
  67. MAX_MODEL_UPLOAD_MB: "${MAX_MODEL_UPLOAD_MB:-512}"
  68. healthcheck:
  69. test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
  70. interval: 30s
  71. timeout: 5s
  72. start_period: 10s
  73. retries: 3
  74. profiles:
  75. - bambu