-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (35 loc) · 1.08 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
include .env
export $(shell sed 's/=.*//' .env)
default: start
up:
docker-compose -f docker-compose.yml up -d
stop:
docker-compose -f docker-compose.yml stop
purge:
docker-compose -f docker-compose.yml stop && docker-compose -f docker-compose.yml rm -fv
restart:
$(MAKE) stop
$(MAKE) up
build:
$(MAKE) build-analytics
push:
$(MAKE) push-auth
build-and-push:
$(MAKE) build
$(MAKE) push
build-api:
docker build --platform linux/amd64 -t ${REGISTRY}${REPOSITORY}/api:${TAG} -f docker/api/Dockerfile --target node_dist --build-arg BUILD_BIN="api" .
push-api:
docker push ${REGISTRY}${REPOSITORY}/api:${TAG}
build-website:
docker build --platform linux/amd64 -t ${REGISTRY}${REPOSITORY}/website:${TAG} -f docker/website/Dockerfile --target website --build-arg BUILD_BIN="website" .
push-website:
docker push ${REGISTRY}${REPOSITORY}/website:${TAG}
deploy-api:
kubectl apply -f deploy/services/api.yml
destroy-api:
kubectl delete -f deploy/services/api.yml
deploy-website:
kubectl apply -f deploy/services/website.yml
destroy-website:
kubectl delete -f deploy/services/website.yml