use-docker-compose.yaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. networks:
  2. r2r-network:
  3. external: true
  4. attachable: true
  5. labels:
  6. - "com.docker.compose.recreate=always"
  7. #name: r2r_r2r-network
  8. volumes:
  9. hatchet_certs:
  10. name: hatchet_certs
  11. hatchet_config:
  12. name: hatchet_config
  13. hatchet_api_key:
  14. name: hatchet_api_key
  15. postgres_data:
  16. name: postgres_data
  17. hatchet_rabbitmq_data:
  18. name: hatchet_rabbitmq_data
  19. hatchet_rabbitmq_conf:
  20. name: hatchet_rabbitmq_conf
  21. hatchet_postgres_data:
  22. name: hatchet_postgres_data
  23. services:
  24. postgres:
  25. image: pgvector/pgvector:pg16
  26. profiles: [postgres]
  27. env_file:
  28. - ./env/postgres.env
  29. volumes:
  30. - ./postgres_data:/var/lib/postgresql/data
  31. networks:
  32. - r2r-network
  33. ports:
  34. - "5432:5432"
  35. healthcheck:
  36. test: ["CMD-SHELL", "pg_isready -U postgres"]
  37. interval: 10s
  38. timeout: 5s
  39. retries: 5
  40. restart: on-failure
  41. command: >
  42. postgres
  43. -c max_connections=1024
  44. hatchet-postgres:
  45. image: postgres:latest
  46. env_file:
  47. - ./env/hatchet.env
  48. volumes:
  49. - ./hatchet_postgres_data:/var/lib/postgresql/data
  50. networks:
  51. - r2r-network
  52. healthcheck:
  53. test: ["CMD-SHELL", "pg_isready -U hatchet_user -d hatchet"]
  54. interval: 10s
  55. timeout: 5s
  56. retries: 5
  57. hatchet-rabbitmq:
  58. image: "rabbitmq:3-management"
  59. hostname: "hatchet-rabbitmq"
  60. ports:
  61. - "5673:5672"
  62. - "15673:15672"
  63. env_file:
  64. - ./env/hatchet.env
  65. volumes:
  66. - hatchet_rabbitmq_data:/var/lib/rabbitmq
  67. - hatchet_rabbitmq_conf:/etc/rabbitmq/rabbitmq.conf
  68. networks:
  69. - r2r-network
  70. healthcheck:
  71. test: ["CMD", "rabbitmqctl", "status"]
  72. interval: 10s
  73. timeout: 10s
  74. retries: 5
  75. hatchet-create-db:
  76. image: postgres:latest
  77. command: sh /scripts/create-hatchet-db.sh
  78. volumes:
  79. - ./scripts:/scripts
  80. networks:
  81. - r2r-network
  82. env_file:
  83. - ./env/hatchet.env
  84. hatchet-migration:
  85. image: ghcr.io/hatchet-dev/hatchet/hatchet-migrate:v0.53.15
  86. env_file:
  87. - ./env/hatchet.env
  88. networks:
  89. - r2r-network
  90. depends_on:
  91. hatchet-create-db:
  92. condition: service_completed_successfully
  93. hatchet-setup-config:
  94. image: ghcr.io/hatchet-dev/hatchet/hatchet-admin:v0.53.15
  95. command: /hatchet/hatchet-admin quickstart --skip certs --generated-config-dir /hatchet/config --overwrite=false
  96. env_file:
  97. - ./env/hatchet.env
  98. volumes:
  99. - hatchet_certs:/hatchet/certs
  100. - hatchet_config:/hatchet/config
  101. networks:
  102. - r2r-network
  103. depends_on:
  104. hatchet-migration:
  105. condition: service_completed_successfully
  106. hatchet-rabbitmq:
  107. condition: service_healthy
  108. hatchet-engine:
  109. image: ghcr.io/hatchet-dev/hatchet/hatchet-engine:v0.53.15
  110. command: /hatchet/hatchet-engine --config /hatchet/config
  111. restart: on-failure
  112. depends_on:
  113. hatchet-setup-config:
  114. condition: service_completed_successfully
  115. ports:
  116. - "7077:7077"
  117. env_file:
  118. - ./env/hatchet.env
  119. volumes:
  120. - hatchet_certs:/hatchet/certs
  121. - hatchet_config:/hatchet/config
  122. networks:
  123. - r2r-network
  124. healthcheck:
  125. test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8733/live"]
  126. interval: 10s
  127. timeout: 5s
  128. retries: 5
  129. hatchet-dashboard:
  130. image: ghcr.io/hatchet-dev/hatchet/hatchet-dashboard:v0.53.15
  131. command: sh ./entrypoint.sh --config /hatchet/config
  132. restart: on-failure
  133. depends_on:
  134. hatchet-setup-config:
  135. condition: service_completed_successfully
  136. env_file:
  137. - ./env/hatchet.env
  138. volumes:
  139. - hatchet_certs:/hatchet/certs
  140. - hatchet_config:/hatchet/config
  141. networks:
  142. - r2r-network
  143. ports:
  144. - "7274:80"
  145. setup-token:
  146. image: ghcr.io/hatchet-dev/hatchet/hatchet-admin:v0.53.15
  147. command: sh /scripts/setup-token.sh
  148. volumes:
  149. - ./scripts:/scripts
  150. - hatchet_certs:/hatchet/certs
  151. - hatchet_config:/hatchet/config
  152. - hatchet_api_key:/hatchet_api_key
  153. networks:
  154. - r2r-network
  155. depends_on:
  156. hatchet-setup-config:
  157. condition: service_completed_successfully
  158. unstructured:
  159. image: ragtoriches/unst-prod
  160. healthcheck:
  161. test: ["CMD", "curl", "-f", "http://localhost:7275/health"]
  162. interval: 10s
  163. timeout: 5s
  164. retries: 5
  165. networks:
  166. - r2r-network
  167. graph_clustering:
  168. image: ragtoriches/cluster-prod
  169. ports:
  170. - "7276:7276"
  171. healthcheck:
  172. test: ["CMD", "curl", "-f", "http://localhost:7276/health"]
  173. interval: 10s
  174. timeout: 5s
  175. retries: 5
  176. networks:
  177. - r2r-network
  178. r2r:
  179. image: sciphiai/r2r:latest
  180. ports:
  181. - "7272:7272"
  182. env_file:
  183. - ./env/r2r-full.env
  184. command: sh /scripts/start-r2r.sh
  185. healthcheck:
  186. test: ["CMD", "curl", "-f", "http://localhost:7272/v3/health"]
  187. interval: 6s
  188. timeout: 5s
  189. retries: 5
  190. restart: on-failure
  191. volumes:
  192. - ./user_configs:/app/user_configs
  193. - hatchet_api_key:/hatchet_api_key:ro
  194. - ./scripts:/scripts
  195. networks:
  196. - r2r-network
  197. extra_hosts:
  198. - host.docker.internal:host-gateway
  199. depends_on:
  200. setup-token:
  201. condition: service_completed_successfully
  202. unstructured:
  203. condition: service_healthy
  204. graph_clustering:
  205. condition: service_healthy
  206. logging:
  207. driver: fluentd
  208. options:
  209. fluentd-address: host.docker.internal:24224
  210. fluentd-sub-second-precision: "true"
  211. tag: backend
  212. r2r-dashboard:
  213. image: sciphiai/r2r-dashboard:1.0.2
  214. env_file:
  215. - ./env/r2r-dashboard.env
  216. ports:
  217. - "7273:3000"
  218. networks:
  219. - r2r-network
  220. fluent-bit:
  221. image: fluent/fluent-bit:latest
  222. volumes:
  223. - ./fluent-bit:/fluent-bit/etc:ro
  224. ports:
  225. - "24224:24224"
  226. depends_on:
  227. - victoria-logs
  228. networks:
  229. - r2r-network
  230. grafana:
  231. image: grafana/grafana:latest
  232. ports:
  233. - "3001:3000"
  234. volumes:
  235. - ./.data/grafana:/var/lib/grafana
  236. networks:
  237. - r2r-network
  238. victoria-logs:
  239. image: victoriametrics/victoria-logs:v1.10.1-victorialogs
  240. ports:
  241. - "9428:9428"
  242. volumes:
  243. - ./.data/victoria-logs:/data
  244. networks:
  245. - r2r-network
  246. command: -storageDataPath=/data -retentionPeriod=60d