-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.53 KB
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
# Local production-shaped stack: the NetPulse API (multi-worker) behind
# Prometheus + Grafana. Brings the observability surface (/metrics,
# request-duration histograms, alert counters) to life on a dashboard.
#
# docker compose up --build
# API -> http://localhost:8000 (POST /detect/bgp, /metrics)
# Prometheus -> http://localhost:9090
# Grafana -> http://localhost:3000 (admin / admin; dashboard auto-loaded)
services:
netpulse:
build: .
image: netpulse:local
command:
- netpulse
- serve
- --store
- /app/data/fixtures/youtube_2008_demo.duckdb
- --baseline
- /app/data/baselines/yt_rib_filtered.duckdb
- --history
- /tmp/alerts.duckdb
- --host
- 0.0.0.0
- --port
- "8000"
- --workers
- "4"
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/ready')"]
interval: 10s
timeout: 3s
retries: 5
prometheus:
image: prom/prometheus:latest
volumes:
- ./deploy/prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"
depends_on:
- netpulse
grafana:
image: grafana/grafana:latest
environment:
GF_SECURITY_ADMIN_PASSWORD: admin
GF_AUTH_ANONYMOUS_ENABLED: "true"
volumes:
- ./deploy/grafana/provisioning:/etc/grafana/provisioning:ro
- ./docs/grafana:/var/lib/grafana/dashboards:ro
ports:
- "3000:3000"
depends_on:
- prometheus