docker-compose.yml 6.8 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.4"
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 62
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
63 64 65 66 67
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
68
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
69
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
70 71 72
      RESOURCE_STORAGE_TYPE: HDFS
      RESOURCE_UPLOAD_PATH: /dolphinscheduler
      FS_DEFAULT_FS: file:///
L
liwenhe1993 已提交
73
    healthcheck:
74
      test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"]
L
liwenhe1993 已提交
75 76 77
      interval: 30s
      timeout: 5s
      retries: 3
78
      start_period: 30s
L
liwenhe1993 已提交
79 80 81 82
    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 99
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
100 101 102 103 104
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
105
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
106 107 108 109 110
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "AlertServer"]
      interval: 30s
      timeout: 5s
      retries: 3
111
      start_period: 30s
L
liwenhe1993 已提交
112 113
    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 136
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
137 138 139 140 141
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
142
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
143 144 145 146 147 148
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
      interval: 30s
      timeout: 5s
      retries: 3
149
      start_period: 30s
X
xiaochun.liu 已提交
150
    depends_on:
L
liwenhe1993 已提交
151 152
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
X
xiaochun.liu 已提交
153
    volumes:
154 155
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    restart: unless-stopped
156
    networks:
157
    - dolphinscheduler
L
liwenhe1993 已提交
158 159

  dolphinscheduler-worker:
X
xiaochun.liu 已提交
160
    image: apache/dolphinscheduler:latest
L
liwenhe1993 已提交
161
    container_name: dolphinscheduler-worker
162
    command: worker-server
X
xiaochun.liu 已提交
163
    ports:
L
liwenhe1993 已提交
164 165
    - 1234:1234
    - 50051:50051
X
xiaochun.liu 已提交
166
    environment:
L
liwenhe1993 已提交
167 168 169 170 171
      TZ: Asia/Shanghai
      WORKER_EXEC_THREADS: "100"
      WORKER_HEARTBEAT_INTERVAL: "10"
      WORKER_MAX_CPULOAD_AVG: "100"
      WORKER_RESERVED_MEMORY: "0.1"
172
      WORKER_GROUPS: "default"
173
      WORKER_WEIGHT: "100"
174 175 176 177 178 179 180 181 182
      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"
183
      DOLPHINSCHEDULER_DATA_BASEDIR_PATH: /tmp/dolphinscheduler
184
      ALERT_LISTEN_HOST: dolphinscheduler-alert
185 186
      DATABASE_TYPE: postgresql
      DATABASE_DRIVER: org.postgresql.Driver
rockxsj's avatar
rockxsj 已提交
187 188 189 190 191
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
192
      DATABASE_PARAMS: characterEncoding=utf8
L
liwenhe1993 已提交
193
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
194 195 196
      RESOURCE_STORAGE_TYPE: HDFS
      RESOURCE_UPLOAD_PATH: /dolphinscheduler
      FS_DEFAULT_FS: file:///
L
liwenhe1993 已提交
197 198 199 200 201
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
      interval: 30s
      timeout: 5s
      retries: 3
202
      start_period: 30s
203
    depends_on:
L
liwenhe1993 已提交
204 205
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
206
    volumes:
207 208 209 210
    - dolphinscheduler-worker-data:/tmp/dolphinscheduler
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-resource-local:/dolphinscheduler
    restart: unless-stopped
211
    networks:
212 213 214 215 216 217 218 219
    - dolphinscheduler

networks:
  dolphinscheduler:
    driver: bridge

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