-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 813 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 813 Bytes
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
.PHONY: build down up
# Defaults to the latest
AIRFLOW_VERSION := 1.10.15
include .env
export
DOP_PROJECT_ID := #{REPLACE WITH A GCP PROJECT ID WHERE DOP WILL EXECUTE ALL JOBS}
DOP_LOCATION := #{REPLACE WITH A GCP REGION WHERE DATA WILL BE PERSISTED BY DOP}
ENVS := PROJECT_ID=$(DOP_PROJECT_ID) \
LOCATION=$(DOP_LOCATION)
validate:
if [ -z ${DOP_PROJECT_ID} ]; then \
echo "DOP_PROJECT_ID must be defined. Aborting";\
exit 1; \
elif [ -z ${DOP_LOCATION} ]; then \
echo "DOP_LOCATION must be defined. Aborting";\
exit 1; \
elif [ -z ${AIRFLOW_VERSION} ]; then \
echo "AIRFLOW_VERSION must be defined. Aborting";\
exit 1; \
fi
build:
$(ENVS) docker-compose up -d --build webserver
down: validate
$(ENVS) docker-compose down
up:
$(ENVS) docker-compose up -d
logs:
docker logs dop_webserver -f