-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 784 Bytes
/
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
BIN := ./bin/vmtctl
DOCKER_COMPOSE_DOWN = (docker-compose down)
DOCKER_REMOVE_VOLUMES = (docker volume rm `docker volume ls -q`)
# Build only binary
.PHONY: build
build:
@echo "####### Building the binary #######"
go build -o ${BIN} .
# Generate endpoints and bring up clustered victoria-metrics
.PHONY: run
run:
@echo "####### Running the binary #######"
${BIN}
@echo "####### Bringing up containers #######"
docker-compose up -d
# Build a new binary, run it and bring up clustered victoria-metrics
.PHONY: dev
dev: build run
# Clean up after testing
.PHONY: clean
clean:
@echo "###### Removing binary #######"
go clean
rm ${BIN}
@echo "###### Removing containers #######"
$(DOCKER_COMPOSE_DOWN)
@echo "###### Removing volumes #######"
$(DOCKER_REMOVE_VOLUMES)