/
.justfile
52 lines (43 loc) · 1.23 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
set shell := ["zsh", "-uc"]
branch := if `git rev-parse --abbrev-ref HEAD` == "main" { "latest" } else { `git rev-parse --abbrev-ref HEAD` }
build: test
# echo <token> | docker login ghcr.io -u <user> --password-stdin
docker build -t permesi .
docker tag permesi ghcr.io/permesi/permesi:{{ branch }}
docker push ghcr.io/permesi/permesi:{{ branch }}
test: clippy
cargo test
clippy:
cargo clippy --all -- -W clippy::all -W clippy::nursery -D warnings
run:
podman run --rm --name postgres \
-e POSTGRES_USER=permesi \
-e POSTGRES_PASSWORD=permesi \
-p 5432:5432 \
-v $PWD/.postgres-volume:/var/lib/postgresql/data \
postgres:latest &
postgres_stop:
podman stop postrgres
jaeger:
podman run --rm --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-p 14250:14250 \
-p 14268:14268 \
-p 14269:14269 \
-p 9411:9411 \
jaegertracing/all-in-one:latest &
jaeger_stop:
podman stop jaeger
otel:
podman run --rm --name otel-collector \
-p 4317:4317 \
-p 4318:4318 \
-p 8888:8888 \
-v $PWD/.otel-collector-config.yml:/etc/otelcol-contrib/config.yaml \
otel/opentelemetry-collector-contrib:latest &