-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yaml
72 lines (68 loc) · 1.92 KB
/
docker-compose.yaml
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
66
67
68
69
70
71
72
---
# Ports `8081` for metrics server.
services:
monitor:
image: openzeppelin/openzeppelin-monitor:latest
build:
context: .
dockerfile: ${DOCKERFILE:-Dockerfile.development}
environment:
METRICS_PORT: ${METRICS_PORT:-8081}
METRICS_ENABLED: ${METRICS_ENABLED:-false}
# Options: trace, debug, info, warn, error
# Default: info
LOG_LEVEL: ${RUST_LOG:-info}
# Options: stdout, file
# Default: stdout
LOG_MODE: ${LOG_MODE:-stdout}
# Only used if LOG_MODE is file
# Default: 1GB (1073741824 bytes)
LOG_MAX_SIZE: ${LOG_MAX_SIZE:-1073741824}
IN_DOCKER: 'true'
restart: on-failure:5
mem_swappiness: 0
security_opt:
- no-new-privileges
volumes:
- ./config:/app/config/:ro
- ${MONITOR_DATA_DIR:-/dev/null}:/app/data
- ${LOG_DATA_DIR:-./logs}:/app/logs
networks:
- monitor-network
- metrics-network
prometheus:
image: prom/prometheus:v3.1.0
security_opt:
- no-new-privileges
command: --log.level=warn --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus
--storage.tsdb.retention.time=30d
ports:
- 9090:9090/tcp
networks:
- metrics-network
- monitor-network
volumes:
- ./cmd/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
restart: on-failure:5
profiles:
- metrics
grafana:
image: grafana/grafana:11.5.1
security_opt:
- no-new-privileges
ports: [3000:3000/tcp]
networks:
- metrics-network
- monitor-network
volumes:
- ./cmd/prometheus/grafana.ini:/etc/grafana/grafana.ini
- ./cmd/prometheus/datasources:/etc/grafana/provisioning/datasources
- ./cmd/prometheus/dashboards:/etc/grafana/provisioning/dashboards
restart: on-failure:5
profiles:
- metrics
networks:
metrics-network:
internal: true
monitor-network:
driver: bridge