docker-stack.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. ports:
  21. - 5432:5432
  22. environment:
  23. TZ: Asia/Shanghai
  24. POSTGRESQL_USERNAME: root
  25. POSTGRESQL_PASSWORD: root
  26. POSTGRESQL_DATABASE: dolphinscheduler
  27. volumes:
  28. - dolphinscheduler-postgresql:/bitnami/postgresql
  29. networks:
  30. - dolphinscheduler
  31. deploy:
  32. mode: replicated
  33. replicas: 1
  34. dolphinscheduler-zookeeper:
  35. image: bitnami/zookeeper:latest
  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. deploy:
  47. mode: replicated
  48. replicas: 1
  49. dolphinscheduler-api:
  50. image: apache/dolphinscheduler:latest
  51. command: ["api-server"]
  52. ports:
  53. - 12345:12345
  54. environment:
  55. TZ: Asia/Shanghai
  56. POSTGRESQL_HOST: dolphinscheduler-postgresql
  57. POSTGRESQL_PORT: 5432
  58. POSTGRESQL_USERNAME: root
  59. POSTGRESQL_PASSWORD: root
  60. POSTGRESQL_DATABASE: dolphinscheduler
  61. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  62. healthcheck:
  63. test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"]
  64. interval: 30
  65. timeout: 5s
  66. retries: 3
  67. start_period: 30s
  68. volumes:
  69. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  70. networks:
  71. - dolphinscheduler
  72. deploy:
  73. mode: replicated
  74. replicas: 1
  75. dolphinscheduler-frontend:
  76. image: apache/dolphinscheduler:latest
  77. command: ["frontend"]
  78. ports:
  79. - 8888:8888
  80. environment:
  81. TZ: Asia/Shanghai
  82. FRONTEND_API_SERVER_HOST: dolphinscheduler-api
  83. FRONTEND_API_SERVER_PORT: 12345
  84. healthcheck:
  85. test: ["CMD", "nc", "-z", "localhost", "8888"]
  86. interval: 30
  87. timeout: 5s
  88. retries: 3
  89. start_period: 30s
  90. volumes:
  91. - dolphinscheduler-logs:/var/log/nginx
  92. networks:
  93. - dolphinscheduler
  94. deploy:
  95. mode: replicated
  96. replicas: 1
  97. dolphinscheduler-alert:
  98. image: apache/dolphinscheduler:latest
  99. command: ["alert-server"]
  100. environment:
  101. TZ: Asia/Shanghai
  102. XLS_FILE_PATH: "/tmp/xls"
  103. MAIL_SERVER_HOST: ""
  104. MAIL_SERVER_PORT: ""
  105. MAIL_SENDER: ""
  106. MAIL_USER: ""
  107. MAIL_PASSWD: ""
  108. MAIL_SMTP_STARTTLS_ENABLE: "false"
  109. MAIL_SMTP_SSL_ENABLE: "false"
  110. MAIL_SMTP_SSL_TRUST: ""
  111. ENTERPRISE_WECHAT_ENABLE: "false"
  112. ENTERPRISE_WECHAT_CORP_ID: ""
  113. ENTERPRISE_WECHAT_SECRET: ""
  114. ENTERPRISE_WECHAT_AGENT_ID: ""
  115. ENTERPRISE_WECHAT_USERS: ""
  116. POSTGRESQL_HOST: dolphinscheduler-postgresql
  117. POSTGRESQL_PORT: 5432
  118. POSTGRESQL_USERNAME: root
  119. POSTGRESQL_PASSWORD: root
  120. POSTGRESQL_DATABASE: dolphinscheduler
  121. healthcheck:
  122. test: ["CMD", "/root/checkpoint.sh", "AlertServer"]
  123. interval: 30
  124. timeout: 5s
  125. retries: 3
  126. start_period: 30s
  127. volumes:
  128. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  129. networks:
  130. - dolphinscheduler
  131. deploy:
  132. mode: replicated
  133. replicas: 1
  134. dolphinscheduler-master:
  135. image: apache/dolphinscheduler:latest
  136. command: ["master-server"]
  137. ports:
  138. - 5678:5678
  139. environment:
  140. TZ: Asia/Shanghai
  141. MASTER_EXEC_THREADS: "100"
  142. MASTER_EXEC_TASK_NUM: "20"
  143. MASTER_HEARTBEAT_INTERVAL: "10"
  144. MASTER_TASK_COMMIT_RETRYTIMES: "5"
  145. MASTER_TASK_COMMIT_INTERVAL: "1000"
  146. MASTER_MAX_CPULOAD_AVG: "100"
  147. MASTER_RESERVED_MEMORY: "0.1"
  148. POSTGRESQL_HOST: dolphinscheduler-postgresql
  149. POSTGRESQL_PORT: 5432
  150. POSTGRESQL_USERNAME: root
  151. POSTGRESQL_PASSWORD: root
  152. POSTGRESQL_DATABASE: dolphinscheduler
  153. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  154. healthcheck:
  155. test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
  156. interval: 30
  157. timeout: 5s
  158. retries: 3
  159. start_period: 30s
  160. volumes:
  161. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  162. networks:
  163. - dolphinscheduler
  164. deploy:
  165. mode: replicated
  166. replicas: 1
  167. dolphinscheduler-worker:
  168. image: apache/dolphinscheduler:latest
  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: 30
  191. timeout: 5s
  192. retries: 3
  193. start_period: 30s
  194. volumes:
  195. - dolphinscheduler-worker-data:/tmp/dolphinscheduler
  196. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  197. configs:
  198. - source: dolphinscheduler-worker-task-env
  199. target: /opt/dolphinscheduler/conf/env/dolphinscheduler_env.sh
  200. networks:
  201. - dolphinscheduler
  202. deploy:
  203. mode: replicated
  204. replicas: 1
  205. networks:
  206. dolphinscheduler:
  207. driver: overlay
  208. volumes:
  209. dolphinscheduler-postgresql:
  210. dolphinscheduler-zookeeper:
  211. dolphinscheduler-worker-data:
  212. dolphinscheduler-logs:
  213. configs:
  214. dolphinscheduler-worker-task-env:
  215. file: ./dolphinscheduler_env.sh