docker-compose.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. # First build pulls the source from the fork over git (~5 min — downloads
  21. # the BambuStudio AppImage, ~220 MB) and caches the image locally.
  22. # Subsequent runs reuse the cache. Pin the slicer versions via .env.
  23. services:
  24. orca-slicer-api:
  25. build:
  26. context: https://github.com/maziggy/orca-slicer-api.git#bambuddy/profile-resolver
  27. dockerfile: Dockerfile
  28. args:
  29. ORCA_VERSION: "${ORCA_VERSION:-2.3.2}"
  30. image: bambuddy-orca-slicer-api:orca${ORCA_VERSION:-2.3.2}
  31. container_name: orca-slicer-api
  32. restart: unless-stopped
  33. ports:
  34. - "${ORCA_API_PORT:-3003}:3000"
  35. volumes:
  36. - ./data/orca:/app/data
  37. environment:
  38. NODE_ENV: production
  39. PORT: "3000"
  40. healthcheck:
  41. test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
  42. interval: 30s
  43. timeout: 5s
  44. start_period: 10s
  45. retries: 3
  46. bambu-studio-api:
  47. build:
  48. context: https://github.com/maziggy/orca-slicer-api.git#bambuddy/profile-resolver
  49. dockerfile: Dockerfile.bambu-studio
  50. args:
  51. BAMBU_VERSION: "${BAMBU_VERSION:-02.06.00.51}"
  52. image: bambuddy-bambu-studio-api:bambu${BAMBU_VERSION:-02.06.00.51}
  53. container_name: bambu-studio-api
  54. restart: unless-stopped
  55. ports:
  56. - "${BAMBU_API_PORT:-3001}:3000"
  57. volumes:
  58. - ./data/bambu:/app/data
  59. environment:
  60. NODE_ENV: production
  61. PORT: "3000"
  62. healthcheck:
  63. test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
  64. interval: 30s
  65. timeout: 5s
  66. start_period: 10s
  67. retries: 3
  68. profiles:
  69. - bambu