database init
#!/bin/sh
docker run -d --name dolphinscheduler-tools \
-e DATABASE="postgresql" \
-e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \
-e SPRING_DATASOURCE_USERNAME="root" \
-e SPRING_DATASOURCE_PASSWORD="123456" \
--net host \
apache/dolphinscheduler-tools:"3.1.8" tools/bin/upgrade-schema.sh
.env文章来源:https://www.toymoban.com/news/detail-703086.html
DolphinScheduler_HOME=/opt/apache/dolphinscheduler
DolphinScheduler_MASTER_PORT=5678
DolphinScheduler_WORKER_PORT=1234
DolphinScheduler_API_PORT=12345
DolphinScheduler_ALERT_PORT=50052
Zookeeper_CONNECT_STRING=zoo1:2181,zoo2:2182,zoo3:2183
docker-compose.yml文章来源地址https://www.toymoban.com/news/detail-703086.html
version: '3.1'
services:
dolphinscheduler-master:
image: apache/dolphinscheduler-master:3.1.8
restart: always
env_file:
- .env
hostname: dolphinscheduler-master
extra_hosts:
- "zoo1:192.168.0.208"
- "zoo2:192.168.0.208"
- "zoo3:192.168.0.208"
- "postgresql-database:192.168.0.208"
expose:
- "${DolphinScheduler_MASTER_PORT}"
deploy:
replicas: 1
environment:
DATABASE: postgresql
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresql-database:5432/dolphinscheduler
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
REGISTRY_ZOOKEEPER_CONNECT_STRING: "${Zookeeper_CONNECT_STRING}"
dolphinscheduler-worker:
image: apache/dolphinscheduler-worker:3.1.8
restart: always
env_file:
- .env
hostname: dolphinscheduler-worker
extra_hosts:
- "zoo1:192.168.0.208"
- "zoo2:192.168.0.208"
- "zoo3:192.168.0.208"
- "postgresql-database:192.168.0.208"
expose:
- "${DolphinScheduler_WORKER_PORT}"
deploy:
replicas: 1
environment:
DATABASE: postgresql
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresql-database:5432/dolphinscheduler
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
REGISTRY_ZOOKEEPER_CONNECT_STRING: "${Zookeeper_CONNECT_STRING}"
dolphinscheduler-api:
image: apache/dolphinscheduler-api:3.1.8
restart: always
env_file:
- .env
hostname: dolphinscheduler-api
extra_hosts:
- "zoo1:192.168.0.208"
- "zoo2:192.168.0.208"
- "zoo3:192.168.0.208"
- "postgresql-database:192.168.0.208"
expose:
- "${DolphinScheduler_API_PORT}"
ports:
- ${DolphinScheduler_API_PORT}:${DolphinScheduler_API_PORT}
deploy:
replicas: 1
environment:
DATABASE: postgresql
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresql-database:5432/dolphinscheduler
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
REGISTRY_ZOOKEEPER_CONNECT_STRING: "${Zookeeper_CONNECT_STRING}"
dolphinscheduler-alert-server:
image: apache/dolphinscheduler-alert-server:3.1.8
restart: always
env_file:
- .env
hostname: dolphinscheduler-alert-server
extra_hosts:
- "zoo1:192.168.0.208"
- "zoo2:192.168.0.208"
- "zoo3:192.168.0.208"
- "postgresql-database:192.168.0.208"
expose:
- "${DolphinScheduler_ALERT_PORT}"
deploy:
replicas: 1
environment:
DATABASE: postgresql
SPRING_DATASOURCE_URL: jdbc:postgresql://postgresql-database:5432/dolphinscheduler
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: 123456
REGISTRY_ZOOKEEPER_CONNECT_STRING: "${Zookeeper_CONNECT_STRING}"
到了这里,关于dolphinscheduler docker compose安装配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!