This repository contains the scripts/configs to run the official Docker image of Airflow via one command line.
- Unlike the Docker image of Airflow from Puckel, the official Docker image of Airflow link does not have the docker-compose configs and airflow configs in one place.
- This repository gathers all the docker-compose and airflow configs in one place for an easier Airflow setup, based on this official Airflow guide.
- Docker
- Docker-Compose v1.27.0+
- Set the username and password in the environmental variable
- open
~/.bashrc
with your favorite editor and add the following line (changeairflow
into your desired username and password)export _AIRFLOW_WWW_USER_USERNAME="airflow" export _AIRFLOW_WWW_USER_PASSWORD="airflow" export _AIRFLOW_WWW_USER_FIRSTNAME="airflow" export _AIRFLOW_WWW_USER_LASTNAME="airflow" export _AIRFLOW_WWW_USER_EMAIL="[email protected]"
- open
- Run Airflow via the following command
bash ./run_docker.sh
-
Check the Web UI at
http://localhost:8080
(local) orhttp://your_ip_address:8080
(server) and log in using the username and password set in step 1. -
Use
./airflow.sh
to access Python or Bash console./airflow.sh bash
./airflow.sh python
-
To stop and delete containers, run
docker-compose down --volumes --rmi all
-
Airflow config setup
- The airflow config file is at
./config/airflow.cfg
. Check out this page for more details.
- The airflow config file is at
-
Python package dependencies
- Add packages to
requirements.txt
- Add packages to
Hope you enjoy Airflow!