source .airflow/bin/activate
This docker-compose.yaml uses the official apache/airflow images and sets up scheduler, webserver (API), workers, triggerer, DB (Postgres), Redis, and an airflow-init service used for initialization
curl -LfO 'https://airflow.apache.org/docs/apache-airflow/stable/docker-compose.yaml'
Run on terminal -
a. mkdir -p ./dags ./logs ./plugins ./config
b. echo -e "AIRFLOW_UID=50000" > .env
3. Initialize database & create the first user : (But make sure you have Docker Desktop and its running on your system)
docker compose up airflow-init
This will cause - The default account created by the quickstart is airflow / airflow. But If you want the airflow.cfg locally before first run:
docker compose run --rm airflow-cli airflow config list
// That will create a config/airflow.cfg seeded with defaults.
docker compose up -d
docker compose up
docker ps
5. The web UI is available at http://localhost:8080 :
you can log in with airflow / airflow
docker compose up -d
Now, you can see the Airflow UI at localhost:8080
docker compose down
docker compose down --volumes
docker compose down --volumes --rmi all --remove-orphans
docker ps
docker stop <container_id_or_name>