bine mount 3
This commit is contained in:
@@ -9,25 +9,11 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
|
||||||
airflow-init:
|
|
||||||
build: .
|
|
||||||
user: "0:0"
|
|
||||||
environment:
|
|
||||||
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
|
||||||
volumes:
|
|
||||||
- ./dags:/opt/airflow/dags
|
|
||||||
- ./logs:/opt/airflow/logs
|
|
||||||
- ./plugins:/opt/airflow/plugins
|
|
||||||
- ./scripts:/opt/airflow/scripts
|
|
||||||
command: bash -c "chmod -R 777 /opt/airflow/logs && airflow db init"
|
|
||||||
depends_on:
|
|
||||||
- postgres
|
|
||||||
|
|
||||||
airflow-webserver:
|
airflow-webserver:
|
||||||
build: .
|
build: .
|
||||||
user: "50000:0"
|
user: "50000:0"
|
||||||
depends_on:
|
depends_on:
|
||||||
- airflow-init
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
- PYTHONPATH=/opt/airflow
|
- PYTHONPATH=/opt/airflow
|
||||||
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
||||||
@@ -35,28 +21,30 @@ services:
|
|||||||
- AIRFLOW__CORE__LOAD_EXAMPLES=False
|
- AIRFLOW__CORE__LOAD_EXAMPLES=False
|
||||||
volumes:
|
volumes:
|
||||||
- ./dags:/opt/airflow/dags
|
- ./dags:/opt/airflow/dags
|
||||||
- ./logs:/opt/airflow/logs
|
|
||||||
- ./plugins:/opt/airflow/plugins
|
|
||||||
- ./scripts:/opt/airflow/scripts
|
- ./scripts:/opt/airflow/scripts
|
||||||
|
- airflow_logs:/opt/airflow/logs
|
||||||
|
- airflow_plugins:/opt/airflow/plugins
|
||||||
ports:
|
ports:
|
||||||
- "8081:8080"
|
- "8081:8080"
|
||||||
command: webserver
|
command: bash -c "airflow db upgrade && airflow webserver"
|
||||||
|
|
||||||
airflow-scheduler:
|
airflow-scheduler:
|
||||||
build: .
|
build: .
|
||||||
user: "50000:0"
|
user: "50000:0"
|
||||||
depends_on:
|
depends_on:
|
||||||
- airflow-init
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
- PYTHONPATH=/opt/airflow
|
- PYTHONPATH=/opt/airflow
|
||||||
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
|
||||||
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
|
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
|
||||||
volumes:
|
volumes:
|
||||||
- ./dags:/opt/airflow/dags
|
- ./dags:/opt/airflow/dags
|
||||||
- ./logs:/opt/airflow/logs
|
|
||||||
- ./plugins:/opt/airflow/plugins
|
|
||||||
- ./scripts:/opt/airflow/scripts
|
- ./scripts:/opt/airflow/scripts
|
||||||
|
- airflow_logs:/opt/airflow/logs
|
||||||
|
- airflow_plugins:/opt/airflow/plugins
|
||||||
command: scheduler
|
command: scheduler
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
|
airflow_logs:
|
||||||
|
airflow_plugins:
|
||||||
Reference in New Issue
Block a user