-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (84 loc) · 2.3 KB
/
docker-compose.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3"
volumes:
prometheus_data: {}
grafana_data: {}
networks:
monitor-net:
driver: bridge
services:
#
# The container names share a common prefix "omon" to avoid conflict
# with pre existing containers on the system.
#
# Also, the port numbers were chosen for the same reason.
#
opengrok:
# Runs mirroring + indexing.
container_name: omon-opengrok
image: opengrok/docker:latest
ports:
- "7777:8080/tcp"
environment:
REINDEX: '5'
INDEXER_OPT: '-R /opengrok/etc/opengrok-statsd.xml'
# Volumes store your data between container upgrades.
volumes:
- './opengrok/src/:/opengrok/src/'
- './opengrok/data/:/opengrok/data/'
- './opengrok/etc/:/opengrok/etc/'
networks:
- monitor-net
restart: unless-stopped
statsd_exporter:
# Collects statsd metrics and converts them into Prometheus metrics.
container_name: omon-statsd-exporter
image: prom/statsd-exporter
networks:
- monitor-net
restart: unless-stopped
ports:
- "9123:9102"
- "8125:8125/udp"
volumes:
- './mapping.yml:/tmp/mapping.yml'
command:
- '--statsd.mapping-config=/tmp/mapping.yml'
- '--statsd.listen-udp=:8125'
- '--web.listen-address=:9102'
prometheus:
# Collects metrics by scraping:
# - the OpenGrok /metrics/prometheus endpoint
# - statsd exporter 9123 TCP port
container_name: omon-prometheus
image: prom/prometheus
expose:
- 9999
networks:
- monitor-net
depends_on:
- statsd_exporter
volumes:
- prometheus_data:/prometheus
- './prometheus.yml:/etc/prometheus/prometheus.yml'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--web.listen-address=:9999'
restart: unless-stopped
grafana:
# Displays the metrics retrieved from Prometheus.
container_name: omon-grafana
image: grafana/grafana
depends_on:
- prometheus
ports:
- "3333:3000/tcp"
volumes:
- grafana_data:/var/lib/grafana
- './grafana/provisioning:/etc/grafana/provisioning'
networks:
- monitor-net
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped