-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathMakefile
48 lines (34 loc) · 1.09 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
47
48
.PHONY: all build-all-images build-ds push-images
# default tag, used to tag images
# we use latest as default, for convenience
export TAG ?= latest
REVISION ?= $(shell git rev-parse HEAD)
# where to push docker images
CONTAINER_REPO=eu.gcr.io/objectiv-production
# by default we build all images
all: build-all-images
# what to build
build-all-images: build-backend build-notebook
# what images to push
push-images: push-image-backend push-image-notebook
# images are pushed, tagged both "latest" and $REVISION
push-image-%:
$(eval MODULE = $(subst push-image-,,$@))
$(eval URL=$(CONTAINER_REPO)/$(MODULE))
docker tag objectiv/$(MODULE):$(TAG) $(URL):test
docker push $(URL):test
gcloud container images add-tag --quiet $(URL):test $(URL):$(REVISION)
## build backend images
build-backend:
cd backend && make docker-image
build-notebook:
docker build -t objectiv/notebook -f notebooks/docker/Dockerfile notebooks
publish-tracker:
cd tracker && make publish
# control stack through docker-compose
start:
docker-compose up -d
stop:
docker-compose down
update:
docker-compose up -d --no-deps