docker-compose.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. version: '3.5'
  2. services:
  3. mysql:
  4. container_name: falcon-mysql
  5. image: mysql:5.7
  6. environment:
  7. MYSQL_ROOT_PASSWORD: root
  8. volumes:
  9. - ./scripts/mysql/db_schema:/docker-entrypoint-initdb.d/
  10. - mysql-data:/var/lib/mysql
  11. redis:
  12. container_name: falcon-redis
  13. image: redis:4-alpine3.8
  14. hbs: &falcon
  15. container_name: falcon-hbs
  16. build:
  17. context: ./
  18. args:
  19. MODULE: hbs
  20. dockerfile: Dockerfile.module
  21. image: openfalcon/falcon-hbs:dev
  22. environment:
  23. MYSQL_PORT: root:root@tcp\(falcon-mysql:3306\)
  24. REDIS_PORT: falcon-redis:6379
  25. AGGREGATOR_HTTP: falcon-aggregator:6055
  26. GRAPH_HTTP: falcon-graph:6071
  27. GRAPH_RPC: falcon-graph:6070
  28. HBS_HTTP: falcon-hbs:6031
  29. HBS_RPC: falcon-hbs:6030
  30. JUDGE_HTTP: falcon-judge:6081
  31. JUDGE_RPC: falcon-judge:6080
  32. NODATA_HTTP: falcon-nodata:6090
  33. TRANSFER_HTTP: falcon-transfer:6060
  34. TRANSFER_RPC: falcon-transfer:8433
  35. PLUS_API_HTTP: falcon-api:8080
  36. AGENT_HOSTNAME: docker-agent
  37. depends_on:
  38. - mysql
  39. - redis
  40. command: "sh ctrl.sh run hbs"
  41. agent:
  42. <<: *falcon
  43. build:
  44. context: ./
  45. args:
  46. MODULE: agent
  47. dockerfile: Dockerfile.module
  48. image: openfalcon/falcon-agent:dev
  49. container_name: falcon-agent
  50. depends_on:
  51. - hbs
  52. - transfer
  53. command: "sh ctrl.sh run agent"
  54. aggregator:
  55. <<: *falcon
  56. build:
  57. context: ./
  58. args:
  59. MODULE: aggregator
  60. dockerfile: Dockerfile.module
  61. image: openfalcon/falcon-aggregator:dev
  62. container_name: falcon-aggregator
  63. command: "sh ctrl.sh run aggregator"
  64. nodata:
  65. <<: *falcon
  66. build:
  67. context: ./
  68. args:
  69. MODULE: nodata
  70. dockerfile: Dockerfile.module
  71. image: openfalcon/falcon-nodata:dev
  72. container_name: falcon-nodata
  73. command: "sh ctrl.sh run nodata"
  74. api:
  75. <<: *falcon
  76. build:
  77. context: ./
  78. args:
  79. MODULE: api
  80. dockerfile: Dockerfile.module
  81. image: openfalcon/falcon-api:dev
  82. container_name: falcon-api
  83. command: "sh ctrl.sh run api"
  84. ports:
  85. - 8080:8080
  86. alarm:
  87. <<: *falcon
  88. build:
  89. context: ./
  90. args:
  91. MODULE: alarm
  92. dockerfile: Dockerfile.module
  93. image: openfalcon/falcon-alarm:dev
  94. container_name: falcon-alarm
  95. command: "sh ctrl.sh run alarm"
  96. transfer:
  97. <<: *falcon
  98. build:
  99. context: ./
  100. args:
  101. MODULE: transfer
  102. dockerfile: Dockerfile.module
  103. image: openfalcon/falcon-transfer:dev
  104. container_name: falcon-transfer
  105. depends_on:
  106. - graph
  107. command: "sh ctrl.sh run transfer"
  108. judge:
  109. <<: *falcon
  110. build:
  111. context: ./
  112. args:
  113. MODULE: judge
  114. dockerfile: Dockerfile.module
  115. image: openfalcon/falcon-judge:dev
  116. container_name: falcon-judge
  117. command: "sh ctrl.sh run judge"
  118. graph:
  119. <<: *falcon
  120. build:
  121. context: ./
  122. args:
  123. MODULE: graph
  124. dockerfile: Dockerfile.module
  125. image: openfalcon/falcon-graph:dev
  126. container_name: falcon-graph
  127. volumes:
  128. - graph-data:/open-falcon/data
  129. command: "sh ctrl.sh run graph"
  130. dashboard:
  131. container_name: falcon-dashboard
  132. image: openfalcon/falcon-dashboard:v0.2.1
  133. entrypoint: ./control startfg
  134. environment:
  135. API_ADDR: http://falcon-api:8080/api/v1
  136. PORTAL_DB_HOST: mysql
  137. PORTAL_DB_PORT: 3306
  138. PORTAL_DB_USER: root
  139. PORTAL_DB_PASS: root
  140. PORTAL_DB_NAME: falcon_portal
  141. ALARM_DB_HOST: mysql
  142. ALARM_DB_PORT: 3306
  143. ALARM_DB_USER: root
  144. ALARM_DB_PASS: root
  145. ALARM_DB_NAME: alarms
  146. working_dir: /open-falcon/dashboard
  147. ports:
  148. - 8081:8081
  149. volumes:
  150. mysql-data:
  151. graph-data: