File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM rust:1.86 AS builder
2+ WORKDIR /usr/src/app
3+ COPY . .
4+ RUN cargo build --release
5+
6+ FROM debian:bullseye-slim
7+ RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
8+ WORKDIR /usr/local/bin
9+ COPY --from=builder /usr/src/app/target/release/blocktop .
10+ EXPOSE 9898
11+ ENTRYPOINT ["blocktop" ]
Original file line number Diff line number Diff line change 1+ services :
2+ blocktop :
3+ build : .
4+ command : ["blocktop", "--headless", "--metrics"]
5+ environment :
6+ - RUST_LOG=info
7+ ports :
8+ - " 9898:9898"
9+ networks :
10+ - monitoring
11+
12+ prometheus :
13+ image : prom/prometheus:latest
14+ volumes :
15+ - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
16+ ports :
17+ - " 9090:9090"
18+ networks :
19+ - monitoring
20+
21+ grafana :
22+ image : grafana/grafana:latest
23+ ports :
24+ - " 3000:3000"
25+ volumes :
26+ - grafana-data:/var/lib/grafana
27+ environment :
28+ - GF_AUTH_ANONYMOUS_ENABLED=true
29+ networks :
30+ - monitoring
31+
32+ volumes :
33+ grafana-data :
34+
35+ networks :
36+ monitoring :
37+ driver : bridge
Original file line number Diff line number Diff line change 1+ global :
2+ scrape_interval : 30s
3+ scrape_configs :
4+ - job_name : ' blocktop'
5+ metrics_path : /metrics
6+ static_configs :
7+ - targets : ['blocktop:9898']
8+
You can’t perform that action at this time.
0 commit comments