forked from ccc-ProductionEngineering/service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
144 lines (143 loc) · 4.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
144 lines (143 loc) · 4.22 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
services:
hello:
image: hello-img
build: .
ports:
- 8080:8080
# Port for debug
- 5005:5005
environment:
ENVIRONMENT_NAME: local
MONGODB_CONECTION_URL: mongodb://root:example@mongo:27017/
restart: always
profiles:
- "hello-service"
jenkins:
image: jenkins/jenkins
ports:
- 8082:8080
- 50000:50000
restart: on-failure
volumes:
- /workspaces/jenkins_config:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- ./Dockerfile:/Dockerfile
- /usr/libexec/docker/cli-plugins/docker-compose:/usr/libexec/docker/cli-plugins/docker-compose
profiles:
- "hello-service"
user: 0:0
mongo:
image: mongo:6.0.20
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
profiles:
- "mongo"
mongo-admin-ui:
image: mongo-express
restart: always
ports:
- 8090:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/
ME_CONFIG_BASICAUTH_USERNAME: unibuc
ME_CONFIG_BASICAUTH_PASSWORD: adobe
profiles:
- "mongo"
# MONITORING SERVICES
cadvisor: # container metric prometheus exporter
image: gcr.io/cadvisor/cadvisor:v0.51.0
container_name: cadvisor
ports:
- "8081:8080"
volumes:
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/machine-id:/etc/machine-id:ro
- /var/lib/dbus/machine-id:/var/lib/dbus/machine-id:ro
profiles:
- "monitoring"
mongodb-exporter:
build: ./infrastructure/mongodb_exporter/
command: ./mongodb_exporter-linux-amd64 -logtostderr -mongodb.uri mongodb://root:example@mongo:27017 -groups.enabled 'asserts,durability,background_flusshing,connections,extra_info,global_lock,index_counters,network,op_counters,op_counters_repl,memory,locks,metrics'
restart: always
ports:
- 9001:9001
profiles:
- "monitoring"
loki:
image: grafana/loki:3.3.2
ports:
- 3100:3100
volumes:
- ./infrastructure/loki/:/etc/loki/
command: -config.file=/etc/loki/config.yaml
profiles:
- "monitoring"
prometheus: # metrics aggregation and alert definition server (prometheus server)
image: prom/prometheus:v3.1.0
volumes:
- ./infrastructure/prometheus/:/etc/prometheus/
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/etc/prometheus/durable"
ports:
- 9090:9090
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"
profiles:
- "monitoring"
alertmanager: # alert manager (prometheus)
image: prom/alertmanager:v0.28.0
volumes:
- ./infrastructure/alertmanager/:/config/
command: --config.file=/config/alertmanager.yml --log.level=debug
ports:
- "9093:9093"
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"
profiles:
- "monitoring"
grafana: # dashboard visualisation tool (metrics & logs)
image: grafana/grafana:11.4.0
volumes:
- ./infrastructure/grafana/provisioning:/etc/grafana/provisioning
- ./infrastructure/grafana/dashboards:/etc/grafana/dashboards
ports:
- 3000:3000
environment:
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
profiles:
- "monitoring"
wrk-injector-hello-functional: # traffic injector (low)
image: mtchavez/docker-wrk
profiles:
- "perf"
command: wrk -t4 -c10 -d300s http://hello:8080/hello-world
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"
wrk-injector-info-perf: # traffic injector (high)
image: mtchavez/docker-wrk
profiles:
- "perf"
command: wrk -t4 -c1000 -d5m --timeout 1s --latency http://hello:8080/info
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"