BigData / Apache Airflow Interview Questions
How do you deploy Apache Airflow using Docker Compose?
The official Airflow Docker Compose setup (docker-compose.yaml) is the quickest way to run a production-like local environment with Postgres, Redis, and CeleryExecutor. Steps:
- Download the official compose file:
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml' - Create required directories:
mkdir -p ./dags ./logs ./plugins ./config - Set the Airflow UID:
echo -e "AIRFLOW_UID=$(id -u)" > .env - Initialise the database:
docker compose up airflow-init - Start all services:
docker compose up -d
The UI is available at http://localhost:8080 with user airflow / password airflow.
More Related questions...