bind mount

This commit is contained in:
Debby
2026-03-08 11:21:13 +07:00
parent 6a28c01f44
commit 94cfe71c51

View File

@@ -15,15 +15,15 @@ services:
depends_on:
- postgres
environment:
- PYTHONPATH=/opt/airflow # Kunci agar folder scripts terbaca
- PYTHONPATH=/opt/airflow
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
- AIRFLOW__CORE__LOAD_EXAMPLES=False
volumes:
- airflow_dags:/opt/airflow/dags
- airflow_logs:/opt/airflow/logs
- airflow_plugins:/opt/airflow/plugins
- airflow_scripts:/opt/airflow/scripts
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./scripts:/opt/airflow/scripts
ports:
- "8081:8080"
command: bash -c "airflow db init && airflow webserver"
@@ -38,15 +38,11 @@ services:
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
volumes:
- airflow_dags:/opt/airflow/dags
- airflow_logs:/opt/airflow/logs
- airflow_plugins:/opt/airflow/plugins
- airflow_scripts:/opt/airflow/scripts
- ./dags:/opt/airflow/dags
- ./logs:/opt/airflow/logs
- ./plugins:/opt/airflow/plugins
- ./scripts:/opt/airflow/scripts
command: scheduler
volumes:
postgres_data:
airflow_dags:
airflow_logs:
airflow_plugins:
airflow_scripts:
postgres_data: