-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 1.22 KB
/
Copy pathMakefile
File metadata and controls
39 lines (28 loc) · 1.22 KB
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
.PHONY: help
.DEFAULT_GOAL := help
SHELL=bash
UID := $(shell id -u)
dc_path=./docker-compose.yaml
clickhouse_container=basicrum_clickhouse_server_build
grafana_container=basicrum_grafana_build
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
up: ## Starts the environment
env UID=${UID} docker-compose -f ${dc_path} build
env UID=${UID} docker-compose -f ${dc_path} up -d
down: ## Stops the environment
env UID=${UID} docker-compose -f ${dc_path} down
restart: down up # Restart the environment
rebuild: ## Rebuilds the environment from scratch
@/bin/echo -n "All the volumes will be deleted. You will loose data in DB. Are you sure? [y/N]: " && read answer && \
[[ $${answer:-N} = y ]] && make destroy
destroy: ## Destroys thel environment
docker-compose -f ${dc_path} down --volumes --remove-orphans
docker-compose -f ${dc_path} rm -vsf
jump_clickhouse: ## Jump to the ClickHouse container
docker-compose -f ${dc_path} exec ${clickhouse_container} bash
jump_grafana: ## Jump to the Grafana container
docker-compose -f ${dc_path} exec ${grafana_container} bash
.PHONY: docker/local/build
docker/local/build:
docker build -t dashboard .