docker-compose.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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.8"
  17. services:
  18. dolphinscheduler-postgresql:
  19. image: bitnami/postgresql:11.11.0
  20. ports:
  21. - "5432:5432"
  22. profiles: ["all", "schema"]
  23. environment:
  24. POSTGRESQL_USERNAME: root
  25. POSTGRESQL_PASSWORD: root
  26. POSTGRESQL_DATABASE: dolphinscheduler
  27. volumes:
  28. - dolphinscheduler-postgresql:/bitnami/postgresql
  29. healthcheck:
  30. test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/5432"]
  31. interval: 5s
  32. timeout: 60s
  33. retries: 120
  34. networks:
  35. - dolphinscheduler
  36. dolphinscheduler-zookeeper:
  37. image: bitnami/zookeeper:3.6.2
  38. profiles: ["all"]
  39. environment:
  40. ALLOW_ANONYMOUS_LOGIN: "yes"
  41. ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
  42. volumes:
  43. - dolphinscheduler-zookeeper:/bitnami/zookeeper
  44. healthcheck:
  45. test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/2181"]
  46. interval: 5s
  47. timeout: 60s
  48. retries: 120
  49. networks:
  50. - dolphinscheduler
  51. dolphinscheduler-schema-initializer:
  52. image: ${HUB}/dolphinscheduler-tools:${TAG}
  53. env_file: .env
  54. profiles: ["schema"]
  55. command: [ tools/bin/upgrade-schema.sh ]
  56. depends_on:
  57. dolphinscheduler-postgresql:
  58. condition: service_healthy
  59. volumes:
  60. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  61. - dolphinscheduler-shared-local:/opt/soft
  62. - dolphinscheduler-resource-local:/dolphinscheduler
  63. networks:
  64. - dolphinscheduler
  65. dolphinscheduler-api:
  66. image: ${HUB}/dolphinscheduler-api:${TAG}
  67. ports:
  68. - "12345:12345"
  69. - "25333:25333"
  70. profiles: ["all"]
  71. env_file: .env
  72. healthcheck:
  73. test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
  74. interval: 30s
  75. timeout: 5s
  76. retries: 3
  77. depends_on:
  78. dolphinscheduler-zookeeper:
  79. condition: service_healthy
  80. volumes:
  81. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  82. - dolphinscheduler-shared-local:/opt/soft
  83. - dolphinscheduler-resource-local:/dolphinscheduler
  84. networks:
  85. - dolphinscheduler
  86. dolphinscheduler-alert:
  87. image: ${HUB}/dolphinscheduler-alert-server:${TAG}
  88. profiles: ["all"]
  89. env_file: .env
  90. healthcheck:
  91. test: [ "CMD", "curl", "http://localhost:50053/actuator/health" ]
  92. interval: 30s
  93. timeout: 5s
  94. retries: 3
  95. volumes:
  96. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  97. networks:
  98. - dolphinscheduler
  99. dolphinscheduler-master:
  100. image: ${HUB}/dolphinscheduler-master:${TAG}
  101. profiles: ["all"]
  102. env_file: .env
  103. healthcheck:
  104. test: [ "CMD", "curl", "http://localhost:5679/actuator/health" ]
  105. interval: 30s
  106. timeout: 5s
  107. retries: 3
  108. depends_on:
  109. dolphinscheduler-zookeeper:
  110. condition: service_healthy
  111. volumes:
  112. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  113. - dolphinscheduler-shared-local:/opt/soft
  114. networks:
  115. - dolphinscheduler
  116. dolphinscheduler-worker:
  117. image: ${HUB}/dolphinscheduler-worker:${TAG}
  118. profiles: ["all"]
  119. env_file: .env
  120. healthcheck:
  121. test: [ "CMD", "curl", "http://localhost:1235/actuator/health" ]
  122. interval: 30s
  123. timeout: 5s
  124. retries: 3
  125. depends_on:
  126. dolphinscheduler-zookeeper:
  127. condition: service_healthy
  128. volumes:
  129. - dolphinscheduler-worker-data:/tmp/dolphinscheduler
  130. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  131. - dolphinscheduler-shared-local:/opt/soft
  132. - dolphinscheduler-resource-local:/dolphinscheduler
  133. networks:
  134. - dolphinscheduler
  135. networks:
  136. dolphinscheduler:
  137. driver: bridge
  138. volumes:
  139. dolphinscheduler-postgresql:
  140. dolphinscheduler-zookeeper:
  141. dolphinscheduler-worker-data:
  142. dolphinscheduler-logs:
  143. dolphinscheduler-shared-local:
  144. dolphinscheduler-resource-local: