-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (32 loc) · 1.38 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
46
runall: ## Load the data, start api and frontend client
make etl-loaddata
make api-build
make api-start-background
make client-start
### ETL ###
etl-build: ## Build ETL container
docker build -t etl etl/docker
etl-notebook: ## Start a jupyter notebook
docker-compose -f etl/docker/compose-notebook.yaml -p etl up
etl-loaddata: ## Drop database and recreate
-docker stop api_flask_1
-docker stop api_database_1
-docker container rm etl_database_1
-docker container rm api_database_1
-docker volume rm etl_postgres_data
docker-compose -f etl/docker/compose-loaddata.yaml -p etl up --build --abort-on-container-exit --exit-code-from etl
### CLIENT ###
client-start: ## Start frontend
cd client && yarn start
### API ###
api-build: ## Rebuild flask container - use this if you change requirements.txt or Dockerfile
docker-compose -f api/docker-compose.yaml build
api-start: ## Start flask and postgres with logs from both containers streaming to stdout
docker-compose -f api/docker-compose.yaml up
api-start-debug: ## Start flask/postgres with debugging enabled
DEBUG=True docker-compose -f api/docker-compose.yaml up
api-start-background: ## Start flask/postgres in the background
docker-compose -f api/docker-compose.yaml up -d
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'