不要在 docker-compose 上加载默认 dag
Don't load default dags on docker-compose
为了不加载默认 DAGS,我编辑了容器的文件 airflow.cfg:airflow-scheduler_1、airflow-webserver_1 和 airflow-worker_1。编辑完每一个后,我制作了 db reset
。不幸的是,默认的 dags 总是存在的。
你怎么做到的?
docker-compose ps
airflow-init_1 /bin/bash -c function ver( ... Exit 0
airflow-scheduler_1 /usr/bin/dumb-init -- /ent ... Up (unhealthy) 8080/tcp
airflow-triggerer_1 /usr/bin/dumb-init -- /ent ... Up (unhealthy) 8080/tcp
airflow-webserver_1 /usr/bin/dumb-init -- /ent ... Up (healthy) 0.0.0.0:8080->8080/tcp,:::8080->8080/tcp
airflow-worker_1 /usr/bin/dumb-init -- /ent ... Up (unhealthy) 8080/tcp
flower_1 /usr/bin/dumb-init -- /ent ... Up (healthy) 0.0
.0.0:5555->5555/tcp,:::5555->5555/tcp, 8080/tcp
postgres_1 docker-entrypoint.sh postgres Up (healthy) 5432/tcp
redis_1 docker-entrypoint.sh redis ... Up (healthy) 6379/tcp
在 docker-compose.yaml 文件中,有一行
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
您应该将 'true'
更改为 'false'
。之后,将不会加载默认示例 DAG。
为了不加载默认 DAGS,我编辑了容器的文件 airflow.cfg:airflow-scheduler_1、airflow-webserver_1 和 airflow-worker_1。编辑完每一个后,我制作了 db reset
。不幸的是,默认的 dags 总是存在的。
你怎么做到的?
docker-compose ps
airflow-init_1 /bin/bash -c function ver( ... Exit 0
airflow-scheduler_1 /usr/bin/dumb-init -- /ent ... Up (unhealthy) 8080/tcp
airflow-triggerer_1 /usr/bin/dumb-init -- /ent ... Up (unhealthy) 8080/tcp
airflow-webserver_1 /usr/bin/dumb-init -- /ent ... Up (healthy) 0.0.0.0:8080->8080/tcp,:::8080->8080/tcp
airflow-worker_1 /usr/bin/dumb-init -- /ent ... Up (unhealthy) 8080/tcp
flower_1 /usr/bin/dumb-init -- /ent ... Up (healthy) 0.0
.0.0:5555->5555/tcp,:::5555->5555/tcp, 8080/tcp
postgres_1 docker-entrypoint.sh postgres Up (healthy) 5432/tcp
redis_1 docker-entrypoint.sh redis ... Up (healthy) 6379/tcp
在 docker-compose.yaml 文件中,有一行
AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
您应该将 'true'
更改为 'false'
。之后,将不会加载默认示例 DAG。