-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
75 lines (68 loc) · 2.78 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
SHELL := /bin/bash
PWD := $(shell pwd)
clean:
rm -rf */*.exe
.PHONY: clean
build:
go build -v ./common/...
go build -v ./dim_reducer/...
go build -v ./data_processor/...
go build -v ./filters/filter_escalas/...
go build -v ./filters/filter_distancias/...
go build -v ./distance_completer/...
go build -v ./simple_saver/...
go build -v ./server/...
go build -v ./client/...
go build -v ./ex4_sink/...
go build -v ./avg_calculator_ex4/...
go build -v ./dispatcher_ex4/...
go build -v ./ex4_journey_saver/...
go build -v ./saver_ex_3/...
.PHONY: build
test:
go test -v ./common/...
go test -v ./dim_reducer/...
go test -v ./data_processor/...
go test -v ./filters/filter_escalas/...
go test -v ./filters/filter_distancias/...
go test -v ./distance_completer/...
go test -v ./simple_saver/...
go test -v ./server/...
go test -v ./client/...
go test -v ./ex4_sink/...
go test -v ./avg_calculator_ex4/...
go test -v ./dispatcher_ex4/...
go test -v ./ex4_journey_saver/...
go test -v ./saver_ex_3/...
.PHONY: test
docker-image:
docker build -f ./dim_reducer/Dockerfile -t "dim_reducer:latest" .
docker build -f ./data_processor/Dockerfile -t "data_processor:latest" .
docker build -f ./filters/filter_escalas/Dockerfile -t "filter_escalas:latest" .
docker build -f ./filters/filter_distancias/Dockerfile -t "filter_distancias:latest" .
docker build -f ./distance_completer/Dockerfile -t "distance_completer:latest" .
docker build -f ./simple_saver/Dockerfile -t "simple_saver:latest" .
docker build -f ./server/Dockerfile -t "server:latest" .
docker build -f ./client/Dockerfile -t "client:latest" .
docker build -f ./ex4_journey_saver/Dockerfile -t "ex4_journey_saver:latest" .
docker build -f ./ex4_sink/Dockerfile -t "ex4_sink:latest" .
docker build -f ./dispatcher_ex4/Dockerfile -t "dispatcher_ex4:latest" .
docker build -f ./healthchecker/Dockerfile -t "healthchecker:latest" .
docker build -f ./avg_calculator_ex4/Dockerfile -t "avg_calculator_ex4:latest" .
docker build -f ./saver_ex_3/Dockerfile -t "saver_ex_3:latest" .
# Execute this command from time to time to clean up intermediate stages generated
# during client build (your hard drive will like this :) ). Don't left uncommented if you
# want to avoid rebuilding client image every time the docker-compose-up command
# is executed, even when client code has not changed
# docker rmi `docker images --filter label=intermediateStageToBeDeleted=true -q`
.PHONY: docker-image
docker-compose-up: docker-image
docker compose -f docker-compose-dev.yaml up -d --build
.PHONY: docker-compose-up
docker-compose-down:
docker compose -f docker-compose-dev.yaml stop -t 3
docker compose -f docker-compose-dev.yaml down
.PHONY: docker-compose-down
docker-compose-logs:
docker compose -f docker-compose-dev.yaml logs -f
.PHONY: docker-compose-logs