forked from biosimulations/biosimulations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
51 lines (37 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
46
47
48
49
50
51
DOCKER_BUILD_CONTEXT=.
DOCKER_BACKEND_PATH=./Dockerfile
DOCKER_FRONTEND_PATH=./deploy/docker/frontend.dockerfile
DOCKER_PATH=$(DOCKER_BACKEND_PATH)
DOCKER_REGISTRY=docker.io
DOCKER_USER=crbm
APP=biosimulations-api
DOCKER_IMAGE=$(DOCKER_HOST)/$(DOCKER_USER)/$(APP)
COMMIT=$(shell git rev-parse HEAD)
TAG=$(COMMIT)
ENV=production
all: biosimulations-api account-api biosimulations-dispatch-service
.PHONY: all
deploy: push-biosimulations-api push-account-api push-biosimulations-dispatch-service
.PHONY: deploy
build:
docker build -f $(DOCKER_PATH) -t crbm/$(APP):$(TAG) --build-arg app=$(APP) $(DOCKER_BUILD_CONTEXT)
.PHONY: build
push: build
docker push crbm/$(APP):$(TAG)
.PHONY: push
biosimulations-api:
$(MAKE) build APP=biosimulations-api TAG=$(TAG)
.PHONY: biosimulations-api
account-api:
$(MAKE) build APP=account-api TAG=$(TAG)
.PHONY: account-api
biosimulations-dispatch-service:
$(MAKE) build APP=biosimulations-dispatch-service TAG=$(TAG)
push-biosimulations-api:
$(MAKE) push APP=biosimulations-api TAG=$(TAG)
.PHONY: biosimulations-api
push-account-api:
$(MAKE) push APP=account-api TAG=$(TAG)
.PHONY: account-api
push-biosimulations-dispatch-service:
$(MAKE) push APP=biosimulations-dispatch-service TAG=$(TAG)