Skip to content

Instantly share code, notes, and snippets.

@nilsapruzzese
Last active November 8, 2022 10:04
Show Gist options
  • Save nilsapruzzese/4523186051c9322dcf1984014b321027 to your computer and use it in GitHub Desktop.
Save nilsapruzzese/4523186051c9322dcf1984014b321027 to your computer and use it in GitHub Desktop.
How to set up Apache Airflow local with Docker-Compose

Introduction

This guide explains how to use Docker-Compose to set up Apache Airflow Local

1. Clone Git Repo

git clone git@github.com:Aaron-K-T-Berry/airflow-docker-boilerplate.git

2. Build the local extended Airflow container using the local Dockerfile

docker-compose build

3. Run all of the containers used in the stack

docker-compose up

Eg. Take down the airflow stack gracefully

docker-compose down

Once you have your app running, you can access the UI at localhost:8080 like usual and start operating and monitoring the DAGs.


Local editor config

# Create a venv
python -m venv venv
# Add the venv to your path
source venv/bin/activate
# Install all of the python modules that are used in the Docker container
pip install -r requirements.txt

Once you have your app running, you can access the UI at localhost:8080 like usual and start operating and monitoring the DAGs

Login Credentials for airflow

airflow
airflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment