docker-compose.yml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. services:
  18. dolphinscheduler-postgresql:
  19. image: bitnami/postgresql:latest
  20. container_name: dolphinscheduler-postgresql
  21. ports:
  22. - 5432:5432
  23. environment:
  24. TZ: Asia/Shanghai
  25. POSTGRESQL_USERNAME: root
  26. POSTGRESQL_PASSWORD: root
  27. POSTGRESQL_DATABASE: dolphinscheduler
  28. volumes:
  29. - dolphinscheduler-postgresql:/bitnami/postgresql
  30. - dolphinscheduler-postgresql-initdb:/docker-entrypoint-initdb.d
  31. networks:
  32. - dolphinscheduler
  33. dolphinscheduler-zookeeper:
  34. image: bitnami/zookeeper:latest
  35. container_name: dolphinscheduler-zookeeper
  36. ports:
  37. - 2181:2181
  38. environment:
  39. TZ: Asia/Shanghai
  40. ALLOW_ANONYMOUS_LOGIN: "yes"
  41. ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
  42. volumes:
  43. - dolphinscheduler-zookeeper:/bitnami/zookeeper
  44. networks:
  45. - dolphinscheduler
  46. dolphinscheduler-api:
  47. image: apache/dolphinscheduler:latest
  48. container_name: dolphinscheduler-api
  49. command: ["api-server"]
  50. ports:
  51. - 12345:12345
  52. environment:
  53. TZ: Asia/Shanghai
  54. POSTGRESQL_HOST: dolphinscheduler-postgresql
  55. POSTGRESQL_PORT: 5432
  56. POSTGRESQL_USERNAME: root
  57. POSTGRESQL_PASSWORD: root
  58. POSTGRESQL_DATABASE: dolphinscheduler
  59. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  60. healthcheck:
  61. test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"]
  62. interval: 30s
  63. timeout: 5s
  64. retries: 3
  65. start_period: 30s
  66. depends_on:
  67. - dolphinscheduler-postgresql
  68. - dolphinscheduler-zookeeper
  69. volumes:
  70. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  71. networks:
  72. - dolphinscheduler
  73. dolphinscheduler-frontend:
  74. image: apache/dolphinscheduler:latest
  75. container_name: dolphinscheduler-frontend
  76. command: ["frontend"]
  77. ports:
  78. - 8888:8888
  79. environment:
  80. TZ: Asia/Shanghai
  81. FRONTEND_API_SERVER_HOST: dolphinscheduler-api
  82. FRONTEND_API_SERVER_PORT: 12345
  83. healthcheck:
  84. test: ["CMD", "nc", "-z", "localhost", "8888"]
  85. interval: 30s
  86. timeout: 5s
  87. retries: 3
  88. start_period: 30s
  89. depends_on:
  90. - dolphinscheduler-api
  91. volumes:
  92. - dolphinscheduler-logs:/var/log/nginx
  93. networks:
  94. - dolphinscheduler
  95. dolphinscheduler-alert:
  96. image: apache/dolphinscheduler:latest
  97. container_name: dolphinscheduler-alert
  98. command: ["alert-server"]
  99. environment:
  100. TZ: Asia/Shanghai
  101. XLS_FILE_PATH: "/tmp/xls"
  102. MAIL_SERVER_HOST: ""
  103. MAIL_SERVER_PORT: ""
  104. MAIL_SENDER: ""
  105. MAIL_USER: ""
  106. MAIL_PASSWD: ""
  107. MAIL_SMTP_STARTTLS_ENABLE: "false"
  108. MAIL_SMTP_SSL_ENABLE: "false"
  109. MAIL_SMTP_SSL_TRUST: ""
  110. ENTERPRISE_WECHAT_ENABLE: "false"
  111. ENTERPRISE_WECHAT_CORP_ID: ""
  112. ENTERPRISE_WECHAT_SECRET: ""
  113. ENTERPRISE_WECHAT_AGENT_ID: ""
  114. ENTERPRISE_WECHAT_USERS: ""
  115. POSTGRESQL_HOST: dolphinscheduler-postgresql
  116. POSTGRESQL_PORT: 5432
  117. POSTGRESQL_USERNAME: root
  118. POSTGRESQL_PASSWORD: root
  119. POSTGRESQL_DATABASE: dolphinscheduler
  120. healthcheck:
  121. test: ["CMD", "/root/checkpoint.sh", "AlertServer"]
  122. interval: 30s
  123. timeout: 5s
  124. retries: 3
  125. start_period: 30s
  126. depends_on:
  127. - dolphinscheduler-postgresql
  128. volumes:
  129. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  130. networks:
  131. - dolphinscheduler
  132. dolphinscheduler-master:
  133. image: apache/dolphinscheduler:latest
  134. container_name: dolphinscheduler-master
  135. command: ["master-server"]
  136. ports:
  137. - 5678:5678
  138. environment:
  139. TZ: Asia/Shanghai
  140. MASTER_EXEC_THREADS: "100"
  141. MASTER_EXEC_TASK_NUM: "20"
  142. MASTER_HEARTBEAT_INTERVAL: "10"
  143. MASTER_TASK_COMMIT_RETRYTIMES: "5"
  144. MASTER_TASK_COMMIT_INTERVAL: "1000"
  145. MASTER_MAX_CPULOAD_AVG: "100"
  146. MASTER_RESERVED_MEMORY: "0.1"
  147. POSTGRESQL_HOST: dolphinscheduler-postgresql
  148. POSTGRESQL_PORT: 5432
  149. POSTGRESQL_USERNAME: root
  150. POSTGRESQL_PASSWORD: root
  151. POSTGRESQL_DATABASE: dolphinscheduler
  152. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  153. healthcheck:
  154. test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
  155. interval: 30s
  156. timeout: 5s
  157. retries: 3
  158. start_period: 30s
  159. depends_on:
  160. - dolphinscheduler-postgresql
  161. - dolphinscheduler-zookeeper
  162. volumes:
  163. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  164. networks:
  165. - dolphinscheduler
  166. dolphinscheduler-worker:
  167. image: apache/dolphinscheduler:latest
  168. container_name: dolphinscheduler-worker
  169. command: ["worker-server"]
  170. ports:
  171. - 1234:1234
  172. - 50051:50051
  173. environment:
  174. TZ: Asia/Shanghai
  175. WORKER_EXEC_THREADS: "100"
  176. WORKER_HEARTBEAT_INTERVAL: "10"
  177. WORKER_FETCH_TASK_NUM: "3"
  178. WORKER_MAX_CPULOAD_AVG: "100"
  179. WORKER_RESERVED_MEMORY: "0.1"
  180. WORKER_GROUP: "default"
  181. DOLPHINSCHEDULER_DATA_BASEDIR_PATH: "/tmp/dolphinscheduler"
  182. POSTGRESQL_HOST: dolphinscheduler-postgresql
  183. POSTGRESQL_PORT: 5432
  184. POSTGRESQL_USERNAME: root
  185. POSTGRESQL_PASSWORD: root
  186. POSTGRESQL_DATABASE: dolphinscheduler
  187. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  188. healthcheck:
  189. test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
  190. interval: 30s
  191. timeout: 5s
  192. retries: 3
  193. start_period: 30s
  194. depends_on:
  195. - dolphinscheduler-postgresql
  196. - dolphinscheduler-zookeeper
  197. volumes:
  198. - type: bind
  199. source: ./dolphinscheduler_env.sh
  200. target: /opt/dolphinscheduler/conf/env/dolphinscheduler_env.sh
  201. - type: volume
  202. source: dolphinscheduler-worker-data
  203. target: /tmp/dolphinscheduler
  204. - type: volume
  205. source: dolphinscheduler-logs
  206. target: /opt/dolphinscheduler/logs
  207. networks:
  208. - dolphinscheduler
  209. networks:
  210. dolphinscheduler:
  211. driver: bridge
  212. volumes:
  213. dolphinscheduler-postgresql:
  214. dolphinscheduler-postgresql-initdb:
  215. dolphinscheduler-zookeeper:
  216. dolphinscheduler-worker-data:
  217. dolphinscheduler-logs:
  218. configs:
  219. dolphinscheduler-worker-task-env:
  220. file: ./dolphinscheduler_env.sh