-
Notifications
You must be signed in to change notification settings - Fork 2
/
Justfile
65 lines (55 loc) · 1.91 KB
/
Justfile
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
VERSION := "1.1.1" # updated by bumpver
default:
CONFIG_PATH=./custom-config.yaml air
pod:
# 10001 = signal-cli
# 10003 = prometheus
# 10004 = alertmanager
# 10005 = grafana
# 10006 = alertmanager-webhook-signal
@podman pod create --name aws-pod --infra-name aws-infra \
-p 127.0.0.1:10001:8080 \
-p 127.0.0.1:10003:9090 \
-p 127.0.0.1:10004:9093 \
-p 127.0.0.1:10005:3000 \
-p 127.0.0.1:10006:10000 \
grafana:
@podman run -d --name aws-grafana \
--pod aws-pod \
-v "aws-grafana:/var/lib/grafana:rw,Z" \
docker.io/grafana/grafana:10.2.2-ubuntu
prometheus:
@podman run -d --name aws-prometheus \
--pod aws-pod \
-v "$(pwd)/prometheus-config.yml:/etc/prometheus/prometheus.yml:ro,Z" \
-v "$(pwd)/prometheus-rules.yml:/etc/prometheus/rules/rules.yml:ro,Z" \
quay.io/prometheus/prometheus:v2.48.0
alertmanager:
@podman run -d --name aws-alertmanager \
--pod aws-pod \
-v "$(pwd)/alertmanager-config.yml:/etc/alertmanager/alertmanager.yml:ro,Z" \
quay.io/prometheus/alertmanager:v0.26.0 \
--config.file=/etc/alertmanager/alertmanager.yml
signal:
@podman run -d --name aws-signal \
--pod aws-pod \
-v "aws-signal:/home/.local/share/signal-cli:rw,Z" \
-e 'MODE=native' \
docker.io/bbernhard/signal-cli-rest-api:0.81
signal_exec:
@podman exec -it --user signal-api bash
build:
@podman build \
-t docker.io/schlauerlauer/alertmanager-webhook-signal:{{ VERSION }} \
-t docker.io/schlauerlauer/alertmanager-webhook-signal:latest \
-f ./Containerfile
alertmanager-webhook-signal:
@podman run -it --rm --name aws-app \
--pod aws-pod \
-v "$(pwd)/custom-config.yaml:/config.yaml:ro,Z" \
docker.io/schlauerlauer/alertmanager-webhook-signal:{{ VERSION }}
## LINK DEVICE
# just signal_exec
# signal-cli link -n "aws-dev" # copy output
## in bash
# echo "OUTPUT" | xargs -L 1 qrencode -o /tmp/qrcode.png --level=H -v 10 & while [ ! -f /tmp/qrcode.png ]; do sleep 1; done; xdg-open /tmp/qrcode.png