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