docker-compose.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. services:
  2. # ── Orchestration workflow engine ─────────────────────────────────────────
  3. orchestrator:
  4. build:
  5. context: ./services/orchestrator
  6. dockerfile: Dockerfile
  7. image: lf-orchestrator:${ORCHESTRATOR_VERSION:-dev}
  8. container_name: lf-orchestrator
  9. ports:
  10. - "${ORCHESTRATOR_PORT:-1717}:1717"
  11. environment:
  12. MODE: ${ORCHESTRATOR_MODE:-plug}
  13. SPECTROMETER_URL: http://spectrometer:8000
  14. RECONSTRUCTOR_URL: http://reconstructor:8000
  15. SEQ_INTERP_URL: http://seq-interp:7475
  16. depends_on:
  17. seq-interp:
  18. condition: service_healthy
  19. restart: unless-stopped
  20. healthcheck:
  21. test: ["CMD", "curl", "-f", "http://localhost:1717/health"]
  22. interval: 10s
  23. timeout: 5s
  24. retries: 5
  25. start_period: 15s
  26. # ── MRI sequence interpreter ───────────────────────────────────────────────
  27. # Build context is the monorepo root so Dockerfile can access both
  28. # services/seq-interp/ and libs/lf-scanner/
  29. seq-interp:
  30. build:
  31. context: .
  32. dockerfile: services/seq-interp/Dockerfile
  33. image: lf-seq-interp:${SEQ_INTERP_VERSION:-dev}
  34. container_name: lf-seq-interp
  35. ports:
  36. - "${SEQ_INTERP_PORT:-7475}:7475"
  37. volumes:
  38. - seq_interp_input:/app/seq_interp/data/input
  39. - seq_interp_output:/app/seq_interp/data/output
  40. - seq_interp_logs:/app/seq_interp/log
  41. restart: unless-stopped
  42. healthcheck:
  43. test: ["CMD", "curl", "-f", "http://localhost:7475/health"]
  44. interval: 10s
  45. timeout: 5s
  46. retries: 5
  47. start_period: 15s
  48. # ── Spectrometer hardware controller (DRF) ────────────────────────────────
  49. spectrometer:
  50. build:
  51. context: ./services/spectrometer
  52. dockerfile: Dockerfile
  53. image: lf-spectrometer:${SPECTROMETER_VERSION:-dev}
  54. container_name: lf-spectrometer
  55. ports:
  56. - "${SPECTROMETER_PORT:-8000}:8000"
  57. volumes:
  58. - spectrometer_db:/app/db
  59. restart: unless-stopped
  60. healthcheck:
  61. test: ["CMD", "curl", "-f", "http://localhost:8000/api/"]
  62. interval: 15s
  63. timeout: 5s
  64. retries: 5
  65. start_period: 30s
  66. # ── MRI image reconstructor ────────────────────────────────────────────────
  67. reconstructor:
  68. build:
  69. context: ./services/reconstructor
  70. dockerfile: Dockerfile
  71. image: lf-reconstructor:${RECONSTRUCTOR_VERSION:-dev}
  72. container_name: lf-reconstructor
  73. ports:
  74. - "${RECONSTRUCTOR_PORT:-8081}:8000"
  75. volumes:
  76. - reconstructor_sessions:/app/sessions
  77. restart: unless-stopped
  78. healthcheck:
  79. test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
  80. interval: 10s
  81. timeout: 5s
  82. retries: 5
  83. start_period: 20s
  84. # ── Spectroscopy signal processor ─────────────────────────────────────────
  85. spectroscopy:
  86. build:
  87. context: ./services/spectroscopy
  88. dockerfile: Dockerfile
  89. image: lf-spectroscopy:${SPECTROSCOPY_VERSION:-dev}
  90. container_name: lf-spectroscopy
  91. ports:
  92. - "${SPECTROSCOPY_PORT:-8002}:8002"
  93. environment:
  94. SERVICE_PORT: "8002"
  95. restart: unless-stopped
  96. healthcheck:
  97. test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
  98. interval: 10s
  99. timeout: 5s
  100. retries: 5
  101. start_period: 15s
  102. volumes:
  103. seq_interp_input:
  104. seq_interp_output:
  105. seq_interp_logs:
  106. reconstructor_sessions:
  107. spectrometer_db: