Files
airflow-coolify/docker-compose.yaml
2026-03-07 16:43:55 +07:00

56 lines
1.7 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:13
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
volumes:
- postgres_data:/var/lib/postgresql/data
airflow-webserver:
build: .
user: "50000:0"
depends_on:
- postgres
environment:
- PYTHONPATH=/opt/airflow
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
- AIRFLOW__CORE__LOAD_EXAMPLES=False
- GOOGLE_APPLICATION_CREDENTIALS=/opt/airflow/secrets/food-security-asean-project-826a4d7b302a.json
volumes:
- airflow_dags:/opt/airflow/dags
- airflow_logs:/opt/airflow/logs
- airflow_plugins:/opt/airflow/plugins
- airflow_scripts:/opt/airflow/scripts
- ./secrets:/opt/airflow/secrets:ro
ports:
- "8081:8080"
command: bash -c "airflow db init && airflow webserver"
airflow-scheduler:
build: .
user: "50000:0"
depends_on:
- postgres
environment:
- PYTHONPATH=/opt/airflow
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://airflow:airflow@postgres/airflow
- AIRFLOW__CORE__EXECUTOR=LocalExecutor
- GOOGLE_APPLICATION_CREDENTIALS=/opt/airflow/secrets/food-security-asean-project-826a4d7b302a.json
volumes:
- airflow_dags:/opt/airflow/dags
- airflow_logs:/opt/airflow/logs
- airflow_plugins:/opt/airflow/secrets:ro
- airflow_scripts:/opt/airflow/scripts
- ./secrets:/opt/airflow/secrets:ro
command: scheduler
volumes:
postgres_data:
airflow_dags:
airflow_logs:
airflow_plugins:
airflow_scripts: