docker-stack.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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. environment:
  21. TZ: Asia/Shanghai
  22. POSTGRESQL_USERNAME: root
  23. POSTGRESQL_PASSWORD: root
  24. POSTGRESQL_DATABASE: dolphinscheduler
  25. ports:
  26. - 5432:5432
  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. environment:
  37. TZ: Asia/Shanghai
  38. ALLOW_ANONYMOUS_LOGIN: "yes"
  39. ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
  40. ports:
  41. - 2181:2181
  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. environment:
  53. TZ: Asia/Shanghai
  54. DATABASE_HOST: dolphinscheduler-postgresql
  55. DATABASE_PORT: 5432
  56. DATABASE_USERNAME: root
  57. DATABASE_PASSWORD: root
  58. DATABASE_DATABASE: dolphinscheduler
  59. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  60. ports:
  61. - 12345:12345
  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. DATABASE_HOST: dolphinscheduler-postgresql
  117. DATABASE_PORT: 5432
  118. DATABASE_USERNAME: root
  119. DATABASE_PASSWORD: root
  120. DATABASE_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. DATABASE_HOST: dolphinscheduler-postgresql
  149. DATABASE_PORT: 5432
  150. DATABASE_USERNAME: root
  151. DATABASE_PASSWORD: root
  152. DATABASE_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. WORKER_WEIGHT: "100"
  182. DOLPHINSCHEDULER_DATA_BASEDIR_PATH: "/tmp/dolphinscheduler"
  183. DATABASE_HOST: dolphinscheduler-postgresql
  184. DATABASE_PORT: 5432
  185. DATABASE_USERNAME: root
  186. DATABASE_PASSWORD: root
  187. DATABASE_DATABASE: dolphinscheduler
  188. ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
  189. healthcheck:
  190. test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
  191. interval: 30
  192. timeout: 5s
  193. retries: 3
  194. start_period: 30s
  195. volumes:
  196. - dolphinscheduler-worker-data:/tmp/dolphinscheduler
  197. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  198. configs:
  199. - source: dolphinscheduler-worker-task-env
  200. target: /opt/dolphinscheduler/conf/env/dolphinscheduler_env.sh
  201. networks:
  202. - dolphinscheduler
  203. deploy:
  204. mode: replicated
  205. replicas: 1
  206. networks:
  207. dolphinscheduler:
  208. driver: overlay
  209. volumes:
  210. dolphinscheduler-postgresql:
  211. dolphinscheduler-zookeeper:
  212. dolphinscheduler-worker-data:
  213. dolphinscheduler-logs:
  214. configs:
  215. dolphinscheduler-worker-task-env:
  216. file: ./dolphinscheduler_env.sh