docker-compose.yml 6.4 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
rockxsj's avatar
rockxsj 已提交
61 62 63 64 65
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
L
liwenhe1993 已提交
66
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
67 68 69
      RESOURCE_STORAGE_TYPE: HDFS
      RESOURCE_UPLOAD_PATH: /dolphinscheduler
      FS_DEFAULT_FS: file:///
L
liwenhe1993 已提交
70
    healthcheck:
71
      test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"]
L
liwenhe1993 已提交
72 73 74
      interval: 30s
      timeout: 5s
      retries: 3
75
      start_period: 30s
L
liwenhe1993 已提交
76 77 78 79
    depends_on:
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
    volumes:
80 81 82
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    - dolphinscheduler-resource-local:/dolphinscheduler
    restart: unless-stopped
L
liwenhe1993 已提交
83
    networks:
84
    - dolphinscheduler
L
liwenhe1993 已提交
85 86

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

  dolphinscheduler-master:
X
xiaochun.liu 已提交
115
    image: apache/dolphinscheduler:latest
L
liwenhe1993 已提交
116
    container_name: dolphinscheduler-master
117
    command: master-server
X
xiaochun.liu 已提交
118
    ports:
L
liwenhe1993 已提交
119
    - 5678:5678
X
xiaochun.liu 已提交
120
    environment:
L
liwenhe1993 已提交
121 122 123 124 125 126 127 128
      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"
rockxsj's avatar
rockxsj 已提交
129 130 131 132 133
      DATABASE_HOST: dolphinscheduler-postgresql
      DATABASE_PORT: 5432
      DATABASE_USERNAME: root
      DATABASE_PASSWORD: root
      DATABASE_DATABASE: dolphinscheduler
L
liwenhe1993 已提交
134 135 136 137 138 139
      ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181
    healthcheck:
      test: ["CMD", "/root/checkpoint.sh", "MasterServer"]
      interval: 30s
      timeout: 5s
      retries: 3
140
      start_period: 30s
X
xiaochun.liu 已提交
141
    depends_on:
L
liwenhe1993 已提交
142 143
    - dolphinscheduler-postgresql
    - dolphinscheduler-zookeeper
X
xiaochun.liu 已提交
144
    volumes:
145 146
    - dolphinscheduler-logs:/opt/dolphinscheduler/logs
    restart: unless-stopped
147
    networks:
148
    - dolphinscheduler
L
liwenhe1993 已提交
149 150

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

networks:
  dolphinscheduler:
    driver: bridge

volumes:
  dolphinscheduler-postgresql:
X
xiaochun.liu 已提交
208
  dolphinscheduler-postgresql-initdb:
209 210
  dolphinscheduler-zookeeper:
  dolphinscheduler-worker-data:
211 212
  dolphinscheduler-logs:
  dolphinscheduler-resource-local: