-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (57 loc) · 1.91 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
###############################################
## One can change docker hub login with
## `make user="<login>" ...`
###############################################
user ?= nikitagsh
export USER_NAME=$(user)
###############################################
## Build images from sources
## and push them to docker hub
###############################################
default: b_all p_all
###############################################
## Build images
###############################################
b_all: b_src b_monitoring
b_src: b_ui b_comment b_post
b_monitoring: b_prometheus b_blackbox-exporter
# ---------------------------------------------- src
b_ui:
@echo Build docker image for: ui
cd src/ui && ./docker_build.sh
b_comment:
@echo Build docker image for: comment
cd src/comment && ./docker_build.sh
b_post:
@echo Build docker image for: post
cd src/post-py && ./docker_build.sh
# ---------------------------------------------- monitoring
b_prometheus:
@echo Build docker image for: prometheus
docker build -t $(user)/prometheus ./monitoring/prometheus
b_blackbox-exporter:
@echo Build docker image for: blackbox-exporter
cd monitoring/blackbox-exporter && ./docker_build.sh
###############################################
## Push images to docker hub
###############################################
p_all: p_src p_monitoring
p_src: p_ui p_comment p_post
p_monitoring: p_prometheus p_blackbox-exporter
# ---------------------------------------------- src
p_ui:
@echo Push docker image of: ui
docker push $(user)/ui
p_comment:
@echo Push docker image of: comment
docker push $(user)/comment
p_post:
@echo Push docker image of: post
docker push $(user)/post
# ---------------------------------------------- monitoring
p_prometheus:
@echo Push docker image of: prometheus
docker push $(user)/prometheus
p_blackbox-exporter:
@echo Push docker image of: blackbox-exporter
docker push $(user)/blackbox-exporter