-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
106 lines (100 loc) · 2.58 KB
/
docker-compose.yml
File metadata and controls
106 lines (100 loc) · 2.58 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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
services:
minitwit:
container_name: minitwit
build:
context: ./itu-minitwit
dockerfile: Dockerfile
restart: always
ports:
- "8080:5273"
environment:
POSTGRES_CONNECTION_STRING: ${POSTGRES_CONNECTION_STRING}
depends_on:
- grafana
- prometheus
- loki
- alloy
grafana:
build:
dockerfile: ./Dockerfile
context: ./itu-minitwit/monitoring/grafana
image: grafana_image
container_name: itu-minitwit-grafana
ports:
- "3000:3000"
depends_on:
- prometheus
- loki
volumes:
- grafana-storage:/var/lib/grafana
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_NAME: "Main Org."
GF_AUTH_ANONYMOUS_ORG_ROLE: "Viewer"
GF_AUTH_DISABLE_LOGIN_FORM: "false"
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD}
prometheus:
build:
dockerfile: ./Dockerfile
context: ./itu-minitwit/monitoring/prometheus
image: prometheus_image
container_name: itu-minitwit-prometheus
ports:
- "9090:9090"
networks:
default:
aliases:
- prometheus
node-exporter:
image: prom/node-exporter:latest
container_name: itu-minitwit-node-exporter
restart: always
command:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/rootfs
- --collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)
pid: host
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
networks:
default:
aliases:
- node-exporter
loki:
image: grafana/loki:3.5.0
container_name: itu-minitwit-loki
command: -config.file=/etc/loki/config.yml
ports:
- "3100:3100"
volumes:
- ./itu-minitwit/monitoring/loki/config.yml:/etc/loki/config.yml:ro
- loki-storage:/loki
networks:
default:
aliases:
- loki
alloy:
image: grafana/alloy:latest
container_name: itu-minitwit-alloy
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/tmp/alloy /etc/alloy/config.alloy
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp
depends_on:
- loki
ports:
- "12345:12345"
volumes:
- ./itu-minitwit/monitoring/alloy/config.alloy:/etc/alloy/config.alloy:ro
- ${ALLOY_DOCKER_CONTAINERS_PATH:-/var/lib/docker/containers}:/var/lib/docker/containers:ro
volumes:
grafana-storage: {}
loki-storage: {}