docker-compose.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. profiles: ["all"]
  70. env_file: .env
  71. healthcheck:
  72. test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
  73. interval: 30s
  74. timeout: 5s
  75. retries: 3
  76. depends_on:
  77. dolphinscheduler-zookeeper:
  78. condition: service_healthy
  79. volumes:
  80. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  81. - dolphinscheduler-shared-local:/opt/soft
  82. - dolphinscheduler-resource-local:/dolphinscheduler
  83. networks:
  84. - dolphinscheduler
  85. dolphinscheduler-alert:
  86. image: ${HUB}/dolphinscheduler-alert-server:${TAG}
  87. profiles: ["all"]
  88. env_file: .env
  89. healthcheck:
  90. test: [ "CMD", "curl", "http://localhost:50053/actuator/health" ]
  91. interval: 30s
  92. timeout: 5s
  93. retries: 3
  94. volumes:
  95. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  96. networks:
  97. - dolphinscheduler
  98. dolphinscheduler-master:
  99. image: ${HUB}/dolphinscheduler-master:${TAG}
  100. profiles: ["all"]
  101. env_file: .env
  102. healthcheck:
  103. test: [ "CMD", "curl", "http://localhost:5679/actuator/health" ]
  104. interval: 30s
  105. timeout: 5s
  106. retries: 3
  107. depends_on:
  108. dolphinscheduler-zookeeper:
  109. condition: service_healthy
  110. volumes:
  111. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  112. - dolphinscheduler-shared-local:/opt/soft
  113. networks:
  114. - dolphinscheduler
  115. dolphinscheduler-worker:
  116. image: ${HUB}/dolphinscheduler-worker:${TAG}
  117. profiles: ["all"]
  118. env_file: .env
  119. healthcheck:
  120. test: [ "CMD", "curl", "http://localhost:1235/actuator/health" ]
  121. interval: 30s
  122. timeout: 5s
  123. retries: 3
  124. depends_on:
  125. dolphinscheduler-zookeeper:
  126. condition: service_healthy
  127. volumes:
  128. - dolphinscheduler-worker-data:/tmp/dolphinscheduler
  129. - dolphinscheduler-logs:/opt/dolphinscheduler/logs
  130. - dolphinscheduler-shared-local:/opt/soft
  131. - dolphinscheduler-resource-local:/dolphinscheduler
  132. networks:
  133. - dolphinscheduler
  134. networks:
  135. dolphinscheduler:
  136. driver: bridge
  137. volumes:
  138. dolphinscheduler-postgresql:
  139. dolphinscheduler-zookeeper:
  140. dolphinscheduler-worker-data:
  141. dolphinscheduler-logs:
  142. dolphinscheduler-shared-local:
  143. dolphinscheduler-resource-local: