-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-rr.yaml
116 lines (105 loc) · 2.5 KB
/
docker-compose-rr.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
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
x-backend-base: &backend-base
build:
context: .
dockerfile: Dockerfile
volumes:
- './config/nginx-related/:/usr/local/openresty/nginx/conf/conf/'
- './nginx-backend.conf:/usr/local/openresty/nginx/conf/nginx.conf'
- './src/:/lua/src/'
# cpus: 0.01
# mem_limit: 6m
x-edge-base: &edge-base
build:
context: .
dockerfile: Dockerfile
volumes:
- './config/nginx-related/:/usr/local/openresty/nginx/conf/conf/'
- './nginx-edge.conf:/usr/local/openresty/nginx/conf/nginx.conf'
- './src/:/lua/src/'
# cpus: 0.01
# mem_limit: 6m
services:
backend1:
<<: *backend-base
container_name: backend1
ports:
- '8080:8080'
backend2:
<<: *backend-base
container_name: backend2
ports:
- '8180:8080'
edge1:
<<: *edge-base
container_name: edge1
ports:
- '8081:8080'
edge2:
<<: *edge-base
container_name: edge2
ports:
- '8082:8080'
edge3:
<<: *edge-base
container_name: edge3
ports:
- '8083:8080'
edge4:
<<: *edge-base
container_name: edge4
ports:
- '8084:8080'
load-balancer:
container_name: load-balancer
build:
context: .
dockerfile: Dockerfile
volumes:
- './config/nginx-related/:/usr/local/openresty/nginx/conf/conf/'
- './nginx-load-balancer-rr.conf:/usr/local/openresty/nginx/conf/nginx.conf'
- './src/:/lua/src/'
depends_on:
- edge1
- edge2
- edge3
- edge4
ports:
- "18080:8080"
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./config/prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=24h'
- '--web.enable-lifecycle'
labels:
org.label-schema.group: 'monitoring'
depends_on:
- backend1
- backend2
- edge1
- edge2
- edge3
- edge4
- load-balancer
ports:
- '9090:9090'
grafana:
user: root
image: grafana/grafana:10.2.2
container_name: grafana
restart: unless-stopped
volumes:
- ./data/grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
ports:
- '3000:3000'