docker-compose.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 runs natively on the Windows host — not in Docker.
  14. # On Windows with Docker Desktop use host.docker.internal; override via .env.
  15. SPECTROMETER_URL: ${SPECTROMETER_URL:-http://host.docker.internal:8000}
  16. RECONSTRUCTOR_URL: http://reconstructor:8000
  17. SEQ_INTERP_URL: http://seq-interp:7475
  18. SPECTROMETER_USER: ${SPECTROMETER_USER:-admin}
  19. SPECTROMETER_PASSWORD: ${SPECTROMETER_PASSWORD:-admin}
  20. WAIT_DATA_TIMEOUT: ${WAIT_DATA_TIMEOUT:-120}
  21. STUB_DATA_PATH: /app/stub_data/response.json
  22. SEQ_OUTPUT_HOST_PATH: ${SEQ_OUTPUT_HOST_PATH:-}
  23. volumes:
  24. - "${STUB_DATA_FILE:-./services/orchestrator/stub_data/response.json}:/app/stub_data/response.json:ro"
  25. restart: unless-stopped
  26. healthcheck:
  27. test: ["CMD", "curl", "-f", "http://localhost:1717/health"]
  28. interval: 10s
  29. timeout: 5s
  30. retries: 5
  31. start_period: 15s
  32. # -- MRI sequence interpreter -----------------------------------------------
  33. # Build context is the monorepo root so Dockerfile can access both
  34. # services/seq-interp/ and libs/lf-scanner/
  35. seq-interp:
  36. build:
  37. context: .
  38. dockerfile: services/seq-interp/Dockerfile
  39. image: lf-seq-interp:${SEQ_INTERP_VERSION:-dev}
  40. container_name: lf-seq-interp
  41. ports:
  42. - "${SEQ_INTERP_PORT:-7475}:7475"
  43. volumes:
  44. - seq_interp_input:/app/seq_interp/data/input
  45. # Bind-mount output so the Windows-native spectrometer can read generated files.
  46. # Set SEQ_OUTPUT_HOST_PATH in .env to the Windows path, e.g. C:/lf_mri_output
  47. - ${SEQ_OUTPUT_HOST_PATH:-./seq_output}:/app/seq_interp/data/output
  48. - seq_interp_logs:/app/seq_interp/log
  49. restart: unless-stopped
  50. healthcheck:
  51. test: ["CMD", "curl", "-f", "http://localhost:7475/health"]
  52. interval: 10s
  53. timeout: 5s
  54. retries: 5
  55. start_period: 15s
  56. # -- MRI image reconstructor ------------------------------------------------
  57. reconstructor:
  58. build:
  59. context: ./services/reconstructor
  60. dockerfile: Dockerfile
  61. image: lf-reconstructor:${RECONSTRUCTOR_VERSION:-dev}
  62. container_name: lf-reconstructor
  63. ports:
  64. - "${RECONSTRUCTOR_PORT:-8081}:8000"
  65. volumes:
  66. - reconstructor_sessions:/app/sessions
  67. restart: unless-stopped
  68. healthcheck:
  69. test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
  70. interval: 10s
  71. timeout: 5s
  72. retries: 5
  73. start_period: 20s
  74. # -- Spectroscopy signal processor -----------------------------------------
  75. spectroscopy:
  76. build:
  77. context: ./services/spectroscopy
  78. dockerfile: Dockerfile
  79. image: lf-spectroscopy:${SPECTROSCOPY_VERSION:-dev}
  80. container_name: lf-spectroscopy
  81. ports:
  82. - "${SPECTROSCOPY_PORT:-8002}:8002"
  83. environment:
  84. SERVICE_PORT: "8002"
  85. restart: unless-stopped
  86. healthcheck:
  87. test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
  88. interval: 10s
  89. timeout: 5s
  90. retries: 5
  91. start_period: 15s
  92. volumes:
  93. seq_interp_input:
  94. # seq_interp_output is a bind-mount (see seq-interp service above)
  95. seq_interp_logs:
  96. reconstructor_sessions: