docker-compose.yml 7.0 KB
Newer Older
L
liwenhe1993 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

17
version: "3.1"
L
liwenhe1993 已提交
18 19 20 21 22 23 24 25 26 27 28 29 30

services:

  dolphinscheduler-postgresql:
    image: bitnami/postgresql:latest
    container_name: dolphinscheduler-postgresql
    ports:
    - 5432:5432
    environment:
      TZ: Asia/Shanghai
      POSTGRESQL_USERNAME: root
      POSTGRESQL_PASSWORD: root
      POSTGRESQL_DATABASE: dolphinscheduler
31
    volumes:
L
liwenhe1993 已提交
32
    - dolphinscheduler-postgresql:/bitnami/postgresql
X
xiaochun.liu 已提交
33
    - dolphinscheduler-postgresql-initdb:/docker-entrypoint-initdb.d
34
    restart: unless-stopped
L
liwenhe1993 已提交
35
    networks:
36
    - dolphinscheduler
L
liwenhe1993 已提交
37 38 39 40 41 42 43 44 45

  dolphinscheduler-zookeeper:
    image: bitnami/zookeeper:latest
    container_name: dolphinscheduler-zookeeper
    ports:
    - 2181:2181
    environment:
      TZ: Asia/Shanghai
      ALLOW_ANONYMOUS_LOGIN: "yes"
X
xiaochun.liu 已提交
46
      ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
L
liwenhe1993 已提交
47 48
    volumes:
    - dolphinscheduler-zookeeper:/bitnami/zookeeper
49
    restart: unless-stopped
L
liwenhe1993 已提交
50
    networks:
51
    - dolphinscheduler
L
liwenhe1993 已提交
52 53

  dolphinscheduler-api:
X
xiaochun.liu 已提交
54
    image: apache/dolphinscheduler:latest
L
liwenhe1993 已提交
55
    container_name: dolphinscheduler-api
56
    command: api-server
L
liwenhe1993 已提交
57 58 59 60
    ports:
    - 12345:12345
    environment:
      TZ: Asia/Shanghai
61
      DOLPHINSCHEDULER_OPTS: "-Xms512m -Xmx512m -Xmn256m"
62 63
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
64 65 66 67 68
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
69
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
70
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
71 72 73
      RESOURCE_STORAGE_TYPE: HDFS
      RESOURCE_UPLOAD_PATH: /dolphinscheduler
      FS_DEFAULT_FS: file:///
L
liwenhe1993 已提交
74
    healthcheck:
75
      test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"]
L
liwenhe1993 已提交
76 77 78 79 80 81 82
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
    volumes:
83 84 85
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-resource-local:/dolphinscheduler
    restart: unless-stopped
L
liwenhe1993 已提交
86
    networks:
87
    - dolphinscheduler
L
liwenhe1993 已提交
88 89

  dolphinscheduler-alert:
X
xiaochun.liu 已提交
90
    image: apache/dolphinscheduler:latest
L
liwenhe1993 已提交
91
    container_name: dolphinscheduler-alert
92
    command: alert-server
93 94
    ports:
    - 50052:50052
L
liwenhe1993 已提交
95 96
    environment:
      TZ: Asia/Shanghai
97
      ALERT_PLUGIN_DIR: lib/plugin/alert
98
      DOLPHINSCHEDULER_OPTS: "-Xms512m -Xmx512m -Xmn256m"
99 100
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
101 102 103 104 105
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
106
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
107 108 109 110 111 112 113
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "AlertServer"]
      interval: 30s
      timeout: 5s
      retries: 3
    depends_on:
    - dolphinscheduler-postgresql
X
xiaochun.liu 已提交
114
    volumes:
115 116
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    restart: unless-stopped
X
xiaochun.liu 已提交
117
    networks:
118
    - dolphinscheduler
L
liwenhe1993 已提交
119 120

  dolphinscheduler-master:
X
xiaochun.liu 已提交
121
    image: apache/dolphinscheduler:latest
L
liwenhe1993 已提交
122
    container_name: dolphinscheduler-master
123
    command: master-server
X
xiaochun.liu 已提交
124
    ports:
L
liwenhe1993 已提交
125
    - 5678:5678
X
xiaochun.liu 已提交
126
    environment:
L
liwenhe1993 已提交
127 128 129 130 131 132 133 134
      TZ: Asia/Shanghai
      MASTER_EXEC_THREADS: "100"
      MASTER_EXEC_TASK_NUM: "20"
      MASTER_HEARTBEAT_INTERVAL: "10"
      MASTER_TASK_COMMIT_RETRYTIMES: "5"
      MASTER_TASK_COMMIT_INTERVAL: "1000"
      MASTER_MAX_CPULOAD_AVG: "100"
      MASTER_RESERVED_MEMORY: "0.1"
135
      DOLPHINSCHEDULER_DATA_BASEDIR_PATH: /tmp/dolphinscheduler
136
      DOLPHINSCHEDULER_OPTS: "-Xms1g -Xmx1g -Xmn512m"
137 138
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
139 140 141 142 143
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
144
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
145 146 147 148 149 150
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
      interval: 30s
      timeout: 5s
      retries: 3
X
xiaochun.liu 已提交
151
    depends_on:
L
liwenhe1993 已提交
152 153
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
X
xiaochun.liu 已提交
154
    volumes:
155 156
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    restart: unless-stopped
157
    networks:
158
    - dolphinscheduler
L
liwenhe1993 已提交
159 160

  dolphinscheduler-worker:
X
xiaochun.liu 已提交
161
    image: apache/dolphinscheduler:latest
L
liwenhe1993 已提交
162
    container_name: dolphinscheduler-worker
163
    command: worker-server
X
xiaochun.liu 已提交
164
    ports:
L
liwenhe1993 已提交
165 166
    - 1234:1234
    - 50051:50051
X
xiaochun.liu 已提交
167
    environment:
L
liwenhe1993 已提交
168 169 170 171 172
      TZ: Asia/Shanghai
      WORKER_EXEC_THREADS: "100"
      WORKER_HEARTBEAT_INTERVAL: "10"
      WORKER_MAX_CPULOAD_AVG: "100"
      WORKER_RESERVED_MEMORY: "0.1"
173
      WORKER_GROUPS: "default"
174
      WORKER_HOST_WEIGHT: "100"
175
      ALERT_LISTEN_HOST: dolphinscheduler-alert
176 177 178 179 180 181 182 183 184
      HADOOP_HOME: "/opt/soft/hadoop"
      HADOOP_CONF_DIR: "/opt/soft/hadoop/etc/hadoop"
      SPARK_HOME1: "/opt/soft/spark1"
      SPARK_HOME2: "/opt/soft/spark2"
      PYTHON_HOME: "/usr/bin/python"
      JAVA_HOME: "/usr/lib/jvm/java-1.8-openjdk"
      HIVE_HOME: "/opt/soft/hive"
      FLINK_HOME: "/opt/soft/flink"
      DATAX_HOME: "/opt/soft/datax/bin/datax.py"
185
      DOLPHINSCHEDULER_DATA_BASEDIR_PATH: /tmp/dolphinscheduler
186
      DOLPHINSCHEDULER_OPTS: "-Xms1g -Xmx1g -Xmn512m"
187 188
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
189 190 191 192 193
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
194
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
195
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
196 197 198
      RESOURCE_STORAGE_TYPE: HDFS
      RESOURCE_UPLOAD_PATH: /dolphinscheduler
      FS_DEFAULT_FS: file:///
L
liwenhe1993 已提交
199 200 201 202 203
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
      interval: 30s
      timeout: 5s
      retries: 3
204
    depends_on:
L
liwenhe1993 已提交
205 206
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
207
    volumes:
208 209 210 211
    - dolphinscheduler-worker-data:/tmp/dolphinscheduler
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-resource-local:/dolphinscheduler
    restart: unless-stopped
212
    networks:
213 214 215 216 217 218 219 220
    - dolphinscheduler

networks:
  dolphinscheduler:
    driver: bridge

volumes:
  dolphinscheduler-postgresql:
X
xiaochun.liu 已提交
221
  dolphinscheduler-postgresql-initdb:
222 223
  dolphinscheduler-zookeeper:
  dolphinscheduler-worker-data:
224 225
  dolphinscheduler-logs:
  dolphinscheduler-resource-local: