Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Airflow Local setup
export AIRFLOW_HOME="$(pwd)/airflow-local"
# -p ignores if file already exists
mkdir -p "$(pwd)/airflow-local"
# Install Airflow using the constraints file
PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
python -m venv venv
source venv/bin/activate
pip install "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
pip install "apache-airflow[postgres]==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
`mkdir -p "${AIRFLOW_HOME}/dags"`
# The Standalone command will initialise the database, make a user,
# and start all components for you.
airflow standalone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment