-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.ha.yml
121 lines (120 loc) · 3.13 KB
/
docker-compose.ha.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
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
---
version: '3'
services:
memcached-server:
image: memcached:1.6.23-alpine3.19
networks:
- reverse-http-net
ports:
- 11211:11211
restart: unless-stopped
proxy-lb:
image: nginx:1.25-alpine
volumes:
- ./tests/ha/nginx-proxy.conf:/etc/nginx/nginx.conf:ro
networks:
- reverse-http-net
proxy-1:
hostname: proxy-1
build:
context: .
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
- '--agent-server.tls.file.key=/certs/proxy-key.pem'
- '--agent-server.tls.file.cert=/certs/proxy.pem'
- '--agent-server.tls.refresh=1s'
- '--http-proxy.listen-address=:3128'
- '--auth.type=noauth'
- '--store.type=memcached'
- '--store.http-proxy-address=proxy-1:3128'
- '--store.memcached.address=memcached-server:11211'
volumes:
- ./tests/cfssl/certs:/certs:ro
networks:
- reverse-http-net
proxy-2:
hostname: proxy-2
build:
context: .
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
- '--agent-server.tls.file.key=/certs/proxy-key.pem'
- '--agent-server.tls.file.cert=/certs/proxy.pem'
- '--agent-server.tls.refresh=1s'
- '--http-proxy.listen-address=:3128'
- '--auth.type=noauth'
- '--store.type=memcached'
- '--store.http-proxy-address=proxy-2:3128'
- '--store.memcached.address=memcached-server:11211'
volumes:
- ./tests/cfssl/certs:/certs:ro
networks:
- reverse-http-net
agent-4711:
hostname: agent-4711
build:
context: .
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy-lb:4242'
- '--agent-client.tls.file.root-ca=/certs/ca.pem'
- '--auth.noauth.agent-id=4711'
volumes:
- ./tests/cfssl/certs:/certs:ro
networks:
- reverse-http-net
agent-4712:
hostname: agent-4712
build:
context: .
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy-lb:4242'
- '--agent-client.tls.file.root-ca=/certs/ca.pem'
- '--auth.noauth.agent-id=4712'
volumes:
- ./tests/cfssl/certs:/certs:ro
networks:
- reverse-http-net
lb-1:
hostname: lb-1
build:
context: .
dockerfile: Dockerfile.develop
command:
- lb
- '--http-proxy.listen-address=:3128'
- '--auth.type=noauth'
- '--store.type=memcached'
- '--store.memcached.address=memcached-server:11211'
networks:
- reverse-http-net
lb-2:
hostname: lb-2
build:
context: .
dockerfile: Dockerfile.develop
command:
- lb
- '--http-proxy.listen-address=:3128'
- '--auth.type=noauth'
- '--store.type=memcached'
- '--store.memcached.address=memcached-server:11211'
networks:
- reverse-http-net
http-proxy:
image: nginx:1.25-alpine
volumes:
- ./tests/ha/nginx-client.conf:/etc/nginx/nginx.conf:ro
ports:
- "3128:3128/tcp"
networks:
- reverse-http-net
networks:
reverse-http-net: