-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathrun-lgtm.cmd
60 lines (49 loc) · 1.05 KB
/
run-lgtm.cmd
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
@echo off
SET release_tag=latest
if not "%~1"=="" (
SET release_tag=%1
)
mkdir "container/grafana"
mkdir "container/prometheus"
mkdir "container/loki"
WHERE /Q podman
if not ERRORLEVEL 1 (
goto use_podman
)
WHERE /Q docker
if not ERRORLEVEL 1 (
goto use_docker
)
:no_executable_found
echo Please install Podman or docker
goto:EOF
:use_podman
podman pull docker.io/grafana/otel-lgtm:%release_tag%
podman run ^
--name lgtm ^
-p 3000:3000 ^
-p 4317:4317 ^
-p 4318:4318 ^
--rm ^
-ti ^
-v %cd%/container/grafana:/data/grafana ^
-v %cd%/container/prometheus:/data/prometheus ^
-v %cd%/container/loki:/loki ^
-e GF_PATHS_DATA=/data/grafana ^
docker.io/grafana/otel-lgtm:%release_tag%
goto:EOF
:use_docker
docker pull docker.io/grafana/otel-lgtm:%release_tag%
docker run ^
--name lgtm ^
-p 3000:3000 ^
-p 4317:4317 ^
-p 4318:4318 ^
--rm ^
-ti ^
-v %cd%/container/grafana:/data/grafana ^
-v %cd%/container/prometheus:/data/prometheus ^
-v %cd%/container/loki:/loki ^
-e GF_PATHS_DATA=/data/grafana ^
docker.io/grafana/otel-lgtm:%release_tag%
goto:EOF