Appearance
Local Airflow
Use the local Airflow containers for DAG development, orchestration experiments, and connector scheduling tests. This is a developer convenience, not the production deployment pattern.
Start Airflow
sh
cp .env.example .env
make airflow-upAirflow starts at:
http://127.0.0.1:8080
The default local administrator account is:
- Username:
airflow - Password:
airflow
Change the AIRFLOW_ADMIN_* values in .env before running this outside disposable local development.
Services
The local scaffold uses the official Apache Airflow image with LocalExecutor and the existing local PostgreSQL metadata database.
Compose services:
airflow-initairflow-apiserverairflow-schedulerairflow-dag-processorpostgres
The airflow-init service applies Airflow database migrations and creates the local admin user.
Metadata Database
Airflow stores its metadata in the existing local PostgreSQL airflow database.
The local Compose service uses:
sh
AIRFLOW_DATABASE_URL=postgresql+psycopg2://airflow:airflow@pgbouncer:6432/airflowThe local PostgreSQL init script creates the airflow database with the AIRFLOW_DATABASE_USER role as owner.
Project Folders
Airflow mounts these local folders:
airflow/dagsairflow/logsairflow/pluginsairflow/config
A small edp_healthcheck DAG is included to confirm DAG discovery.
Common Commands
sh
make airflow-up
make airflow-init
make airflow-logs
make airflow-cli
make airflow-downUse make postgres-down to stop the full local Compose stack.
DAG Guidance
Keep DAGs orchestration-focused. DAGs should schedule and observe connector work, transformations, checks, and publication steps; they should not hide large transformation logic inside Python tasks when that logic belongs in SQL, dbt, or reusable connector code.
Use the Data Mart and ODS databases as downstream targets after raw ingestion and governed transformations are in place.
Configuration
Airflow configuration is primarily environment-driven in compose.yaml and .env.
Important local values:
AIRFLOW_DATABASE_USERAIRFLOW_DATABASE_PASSWORDAIRFLOW_DATABASE_URLAIRFLOW_FERNET_KEYAIRFLOW_SECRET_KEYAIRFLOW_ADMIN_USERNAMEAIRFLOW_ADMIN_PASSWORD
The values in .env.example are intentionally not production-safe.
Airflow image tags are declared in compose.yaml. Override them at the shell or CI environment level only when testing an image upgrade.
Troubleshooting
If Airflow cannot connect to its metadata database:
- Confirm
make postgres-upsucceeds. - Confirm the
airflowdatabase exists. - Confirm
AIRFLOW_DATABASE_URLuses the Compose hostnamepgbouncer.
If DAGs do not appear:
- Confirm files are under
airflow/dags. - Check
make airflow-logs. - Confirm
airflow-dag-processoris running.
If local files are created with unexpected ownership on Linux, adjust ownership on the mounted airflow/logs, airflow/dags, airflow/plugins, or airflow/config folders from the host.