This is a ready-to-run Apache Airflow + Docker environment designed for classroom use. Students can use this to run Airflow DAGs that connect to MongoDB and process stock data.
-
Clone the repo or click "Use this template"
-
Open the cloned repo in VS Code
-
Run the airflow-core-fernet-key.py script to generate a fernet key. This key is used to encrypt sensitive data in Airflow, such as passwords and connection strings. You can run this script in your terminal or command prompt.
you might need to install the cryptography
library if you don't have it already. You can do this by running:
pip install cryptography
Then, run the script:
python airflow-core-fernet-key.py
-
Copy the generated fernet key and paste it into the
editme.env
file in theFERNET_KEY
variable. Then rename the file to just.env
(remove theeditme
part). -
Make sure you have Docker and Docker Compose installed on your machine. You can download them from the official Docker website. Here is the link: https://docs.docker.com/get-docker/
- In that VS Code Terminal Run:
docker compose up --build -d
Login with:
- Username:
airflow
- Password:
airflow
docker compose down