docker-compose.yml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. version: "3.4"
  17. networks:
  18. dolphinscheduler-postgresql:
  19. driver: bridge
  20. dolphinscheduler-zookeeper:
  21. driver: bridge
  22. dolphinscheduler-api:
  23. driver: bridge
  24. dolphinscheduler-frontend:
  25. driver: bridge
  26. dolphinscheduler-alert:
  27. driver: bridge
  28. dolphinscheduler-master:
  29. driver: bridge
  30. dolphinscheduler-worker:
  31. driver: bridge
  32. volumes:
  33. dolphinscheduler-postgresql:
  34. dolphinscheduler-zookeeper:
  35. dolphinscheduler-api:
  36. dolphinscheduler-frontend:
  37. dolphinscheduler-alert:
  38. dolphinscheduler-master:
  39. dolphinscheduler-worker-data:
  40. dolphinscheduler-worker-logs:
  41. configs:
  42. dolphinscheduler-worker-task-env:
  43. file: ./dolphinscheduler_env.sh
  44. services:
  45. dolphinscheduler-postgresql:
  46. image: bitnami/postgresql:latest
  47. container_name: dolphinscheduler-postgresql
  48. ports:
  49. - 5432:5432
  50. environment:
  51. TZ: Asia/Shanghai
  52. POSTGRESQL_USERNAME: root
  53. POSTGRESQL_PASSWORD: root
  54. POSTGRESQL_DATABASE: dolphinscheduler
  55. healthcheck:
  56. test: ["CMD", "pg_isready", "-U", "${POSTGRESQL_USERNAME}", "-d", "{POSTGRESQL_PASSWORD}", "-h", "localhost", "5432"]
  57. interval: 30s
  58. timeout: 5s
  59. retries: 3
  60. # start_period: 30s
  61. volumes:
  62. - dolphinscheduler-postgresql:/bitnami/postgresql
  63. networks:
  64. - dolphinscheduler-postgresql
  65. dolphinscheduler-zookeeper:
  66. image: bitnami/zookeeper:latest
  67. container_name: dolphinscheduler-zookeeper
  68. ports:
  69. - 2181:2181
  70. environment:
  71. TZ: Asia/Shanghai
  72. ALLOW_ANONYMOUS_LOGIN: "yes"
  73. healthcheck:
  74. test: ["CMD-SHELL", "nc -z localhost 2181"]
  75. interval: 30s
  76. timeout: 5s
  77. retries: 3
  78. # start_period: 30s
  79. volumes:
  80. - dolphinscheduler-zookeeper:/bitnami/zookeeper
  81. networks:
  82. - dolphinscheduler-zookeeper
  83. dolphinscheduler-api:
  84. image: registry.cn-qingdao.aliyuncs.com/sxyj/dolphinscheduler:1.2.1
  85. container_name: dolphinscheduler-api
  86. command: ["api-server"]
  87. ports:
  88. - 12345:12345
  89. environment:
  90. TZ: Asia/Shanghai
  91. POSTGRESQL_HOST: dolphinscheduler-postgresql
  92. POSTGRESQL_PORT: 5432
  93. POSTGRESQL_USERNAME: root
  94. POSTGRESQL_PASSWORD: root
  95. POSTGRESQL_DATABASE: dolphinscheduler
  96. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  97. healthcheck:
  98. test: ["CMD-SHELL", "curl -f http://localhost:12345"]
  99. interval: 30s
  100. timeout: 5s
  101. retries: 3
  102. # start_period: 30s
  103. depends_on:
  104. - dolphinscheduler-postgresql
  105. - dolphinscheduler-zookeeper
  106. volumes:
  107. - dolphinscheduler-api:/opt/dolphinscheduler/logs
  108. networks:
  109. - dolphinscheduler-api
  110. - dolphinscheduler-postgresql
  111. - dolphinscheduler-zookeeper
  112. dolphinscheduler-frontend:
  113. image: registry.cn-qingdao.aliyuncs.com/sxyj/dolphinscheduler:1.2.1
  114. container_name: dolphinscheduler-frontend
  115. command: ["frontend"]
  116. ports:
  117. - 8888:8888
  118. environment:
  119. TZ: Asia/Shanghai
  120. FRONTEND_API_SERVER_HOST: dolphinscheduler-api
  121. FRONTEND_API_SERVER_PORT: 12345
  122. healthcheck:
  123. test: ["CMD-SHELL", "curl -f http://localhost:8888"]
  124. interval: 30s
  125. timeout: 5s
  126. retries: 3
  127. # start_period: 30s
  128. depends_on:
  129. - dolphinscheduler-api
  130. volumes:
  131. - dolphinscheduler-frontend:/var/log/nginx
  132. networks:
  133. - dolphinscheduler-frontend
  134. - dolphinscheduler-api
  135. dolphinscheduler-alert:
  136. image: registry.cn-qingdao.aliyuncs.com/sxyj/dolphinscheduler:1.2.1
  137. container_name: dolphinscheduler-alert
  138. command: ["alert-server"]
  139. environment:
  140. TZ: Asia/Shanghai
  141. XLS_FILE_PATH: "/tmp/xls"
  142. MAIL_SERVER_HOST: ""
  143. MAIL_SERVER_PORT: ""
  144. MAIL_SENDER: ""
  145. MAIL_USER: ""
  146. MAIL_PASSWD: ""
  147. MAIL_SMTP_STARTTLS_ENABLE: "false"
  148. MAIL_SMTP_SSL_ENABLE: "false"
  149. MAIL_SMTP_SSL_TRUST: ""
  150. ENTERPRISE_WECHAT_ENABLE: "false"
  151. ENTERPRISE_WECHAT_CORP_ID: ""
  152. ENTERPRISE_WECHAT_SECRET: ""
  153. ENTERPRISE_WECHAT_AGENT_ID: ""
  154. ENTERPRISE_WECHAT_USERS: ""
  155. POSTGRESQL_HOST: dolphinscheduler-postgresql
  156. POSTGRESQL_PORT: 5432
  157. POSTGRESQL_USERNAME: root
  158. POSTGRESQL_PASSWORD: root
  159. POSTGRESQL_DATABASE: dolphinscheduler
  160. healthcheck:
  161. test: ["CMD", "/root/checkpoint.sh", "AlertServer"]
  162. interval: 30s
  163. timeout: 5s
  164. retries: 3
  165. # start_period: 30s
  166. depends_on:
  167. - dolphinscheduler-postgresql
  168. volumes:
  169. - dolphinscheduler-alert:/opt/dolphinscheduler/logs
  170. networks:
  171. - dolphinscheduler-alert
  172. - dolphinscheduler-postgresql
  173. dolphinscheduler-master:
  174. image: registry.cn-qingdao.aliyuncs.com/sxyj/dolphinscheduler:1.2.1
  175. container_name: dolphinscheduler-master
  176. command: ["master-server"]
  177. ports:
  178. - 5678:5678
  179. environment:
  180. TZ: Asia/Shanghai
  181. MASTER_EXEC_THREADS: "100"
  182. MASTER_EXEC_TASK_NUM: "20"
  183. MASTER_HEARTBEAT_INTERVAL: "10"
  184. MASTER_TASK_COMMIT_RETRYTIMES: "5"
  185. MASTER_TASK_COMMIT_INTERVAL: "1000"
  186. MASTER_MAX_CPULOAD_AVG: "100"
  187. MASTER_RESERVED_MEMORY: "0.1"
  188. POSTGRESQL_HOST: dolphinscheduler-postgresql
  189. POSTGRESQL_PORT: 5432
  190. POSTGRESQL_USERNAME: root
  191. POSTGRESQL_PASSWORD: root
  192. POSTGRESQL_DATABASE: dolphinscheduler
  193. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  194. healthcheck:
  195. test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
  196. interval: 30s
  197. timeout: 5s
  198. retries: 3
  199. # start_period: 30s
  200. depends_on:
  201. - dolphinscheduler-postgresql
  202. - dolphinscheduler-zookeeper
  203. volumes:
  204. - dolphinscheduler-master:/opt/dolphinscheduler/logs
  205. networks:
  206. - dolphinscheduler-master
  207. - dolphinscheduler-postgresql
  208. - dolphinscheduler-zookeeper
  209. dolphinscheduler-worker:
  210. image: registry.cn-qingdao.aliyuncs.com/sxyj/dolphinscheduler:1.2.1
  211. container_name: dolphinscheduler-worker
  212. command: ["worker-server"]
  213. ports:
  214. - 1234:1234
  215. - 50051:50051
  216. environment:
  217. TZ: Asia/Shanghai
  218. WORKER_EXEC_THREADS: "100"
  219. WORKER_HEARTBEAT_INTERVAL: "10"
  220. WORKER_FETCH_TASK_NUM: "3"
  221. WORKER_MAX_CPULOAD_AVG: "100"
  222. WORKER_RESERVED_MEMORY: "0.1"
  223. WORKER_GROUP: "default"
  224. DOLPHINSCHEDULER_DATA_BASEDIR_PATH: "/tmp/dolphinscheduler"
  225. POSTGRESQL_HOST: dolphinscheduler-postgresql
  226. POSTGRESQL_PORT: 5432
  227. POSTGRESQL_USERNAME: root
  228. POSTGRESQL_PASSWORD: root
  229. POSTGRESQL_DATABASE: dolphinscheduler
  230. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  231. healthcheck:
  232. test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
  233. interval: 30s
  234. timeout: 5s
  235. retries: 3
  236. # start_period: 30s
  237. depends_on:
  238. - dolphinscheduler-postgresql
  239. - dolphinscheduler-zookeeper
  240. volumes:
  241. - dolphinscheduler-worker-data:/tmp/dolphinscheduler
  242. - dolphinscheduler-worker-logs:/opt/dolphinscheduler/logs
  243. configs:
  244. - source: dolphinscheduler-worker-task-env
  245. target: /opt/dolphinscheduler/conf/env/dolphinscheduler_env.sh
  246. networks:
  247. - dolphinscheduler-worker
  248. - dolphinscheduler-postgresql
  249. - dolphinscheduler-zookeeper