因为官方提供的dolphinscheduler 有一些问题,所以自己调整环境变量的配置,方便直接运行
运行
- docker-compose 文件
version: "3"
比如buildin 改写的时候
{%- macro ref(model_name) -%}
{%- set relation = builtins.ref(model_name) -%}
{%- if execute -%}
{%- set model = graph.nodes.values() | selectattr("name", "equalto", model_name) | list | first -%}
{%- if model.config.materialized == 'reflection' -%}
{% do exceptions.CompilationError("Reflections cannot be ref()erenced (" ~ relation ~ ")") %}
{%- endif -%}
{%- set format = model.config.format if
model.config.materialized not in ['view', 'reflection']
and model.config.format is defined
else none -%}
{%- set format_clause = format_clause_from_node(model.config) if format is not none else none -%}
{%- set relation2 = api.Relation.create(database=relation.database, schema=relation.schema, identifier=relation.identifier, format=format, format_clause=format_clause) -%}
{{ return (relation2) }}
{%- else -%}
{{ return (relation) }}
{%- endif -%}
{%- endmacro -%}
{%- macro source(source_name, table_name) -%}
{%- set relation = builtins.source(source_name, table_name) -%}
{%- if execute -%}
{%- set source = graph.sources.values() | selectattr("source_name", "equalto", source_name) | selectattr("name", "equalto", table_name) | list | first -%}
{%- set format = source.external.format if
source.external is defined
and source.external.format is defined
else none -%}
{%- set format_clause = format_clause_from_node(source.external) if format is not none else none -%}
{%- set relation2 = api.Relation.create(database=relation.database, schema=relation.schema, identifier=relation.identifier, format=format, format_clause=format_clause) -%}
{{ return (relation2) }}
{%- else -%}
{{ return (relation) }}
{%- endif -%}
{%- endmacro -%}
运行&效果
- 启动
schema & db 初始化
docker-compose --profile schema up -d
启动服务
docker-compose --profile all up -d
- 登陆
默认用户密码 admin dolphinscheduler123
http://localhost:12345/dolphinscheduler/ui/
- 效果
说明
目前官方文档与实际新版本文档还是有不少差异的,推荐还是自己运行玩玩,可以更好的了解新版本的功能
参考资料
https://github.com/rongfengliang/dolphinscheduler-docker-compse-running
https://dolphinscheduler.apache.org/zh-cn