-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (53 loc) · 1.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (53 loc) · 1.94 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
# Prometheus + Grafana for the Polymarket arb bot.
#
# The bot runs on the HOST (not in a container) and serves Prometheus metrics at
# http://<health-host>:<health-port>/metrics (default 127.0.0.1:8765).
# Prometheus (in this compose) scrapes it via host.docker.internal.
#
# cd monitoring && docker compose up -d
# Grafana: http://localhost:3000 (anonymous admin, dashboard auto-loaded)
# Prometheus: http://localhost:9090
#
# IMPORTANT: so Prometheus (in Docker) can reach the bot on the host, run the bot
# with --health-host 0.0.0.0 (it binds localhost-only by default):
# ... paper-arb-sim --headless --profile --health-host 0.0.0.0 --health-port 8765
services:
prometheus:
image: prom/prometheus:latest
container_name: arb-prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=15d
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
ports:
- "9090:9090"
extra_hosts:
# Lets `host.docker.internal` resolve to the host on Linux (no-op on macOS,
# where Docker Desktop provides it natively).
- "host.docker.internal:host-gateway"
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: arb-grafana
depends_on:
- prometheus
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning:ro
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
# Anonymous access so you can open the dashboard with zero login friction.
# Remove these three lines if you expose Grafana beyond localhost.
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_USERS_DEFAULT_THEME=dark
ports:
- "3000:3000"
restart: unless-stopped
volumes:
prometheus-data:
grafana-data: