-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (35 loc) · 990 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
38
39
40
41
42
43
44
45
src-paths := src scripts
.PHONY: all check format up down backup-dashbaords backup-metrics restore-metrics
all: format check
check:
mypy $(src-paths)
flake8 $(src-paths)
format:
isort $(src-paths)
black $(src-paths)
up:
docker compose up --detach --build --always-recreate-deps
down:
docker compose down
restart: down up
backup-dashboards:
python scripts/backup_dashboards.py
backup-metrics:
docker run \
--rm \
-it \
--network conn-probe-network \
--mount "type=volume,src=conn-probe-victoriametrics-storage,dst=/storage,readonly" \
--mount "type=bind,src=${CURDIR},dst=/host" \
--entrypoint "sh" \
victoriametrics/vmbackup \
/host/backup-restore/backup-metrics.sh
restore-metrics: down
docker run \
--rm \
-it \
--mount "type=volume,src=conn-probe-victoriametrics-storage,dst=/storage" \
--mount "type=bind,src=${CURDIR},dst=/host" \
--entrypoint "sh" \
victoriametrics/vmrestore \
/host/backup-restore/restore-metrics.sh