-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (30 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.DEFAULT_GOAL := help
.EXPORT_ALL_VARIABLES:
AIRFLOW_HOME = ${PWD}/airflow
AIRFLOW_GENERATED_FILES = logs ../airflow.cfg airflow.db webserver_config.py
init: ## Initialize the database
airflow db init
user: ## Creates a database use called admin
airflow users create --username admin --firstname admin --lastname admin --role Admin --email [email protected] --password admin
webserver: ## Run the web server
airflow webserver --port 8083 &
web: ## Open Airflow UI
open http://localhost:8083
exp: # Set environment variable
export AIRFLOW_HOME=${PWD}/airflow
scheduler: ## Run the scheduler
airflow scheduler &
up: webserver scheduler ## Run Airflow web server and scheduler
down: ## Stop Airflow web server and scheduler
pkill airflow
clean: ## Remove files generated by Airflow setup
@echo removing files generated by airflow or used by the practical work
cd $(AIRFLOW_HOME) && rm -rf $(AIRFLOW_GENERATED_FILES)
help: ## Show the different possible targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
reset:
airflow db reset -y
api: # Run fastAPI
cd api-db & uvicorn main:app --reload
streamlit: # Run Streamlit app
streamlit run app/Predict.py