-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
76 lines (67 loc) · 1.65 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
version: '3'
networks:
wg_network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
monitoring:
driver: bridge
volumes:
prometheus_data: {}
services:
wg_service_1:
image: wireguard_exporter
container_name: wireguard_exporter_1
cap_add:
- NET_ADMIN
- SYS_MODULE
networks:
wg_network:
ipv4_address: 172.28.0.2
monitoring:
volumes:
- ./setup/wireguard/wg0_host_1.conf:/etc/wireguard/wg0.conf
command: sh -c "wg-quick up wg0 && ./main"
expose:
- 9011
wg_service_2:
image: wireguard_exporter
container_name: wireguard_exporter_2
cap_add:
- NET_ADMIN
- SYS_MODULE
networks:
wg_network:
ipv4_address: 172.28.0.3
monitoring:
volumes:
- ./setup/wireguard/wg0_host_2.conf:/etc/wireguard/wg0.conf
command: sh -c "wg-quick up wg0 && ./main"
expose:
- 9011
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./setup/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
expose:
- 9090
networks:
- monitoring
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- ./setup/grafana-provisioning/datasources:/etc/grafana/provisioning/datasources
networks:
- monitoring