-
Notifications
You must be signed in to change notification settings - Fork 175
/
Copy pathtesting-docker-compose.yml
127 lines (115 loc) · 3.82 KB
/
testing-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
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
version: "3.7"
services:
postgres:
image: "docker.io/postgres:13.4"
command: postgres -c 'max_connections=500'
volumes:
- "postgres-data:/var/lib/postgresql/data/"
environment:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
redis:
image: "redis:7.0.10-alpine"
ports:
- "6379:6379"
# Redis cluster
redis-cluster:
image: "docker.io/bitnami/redis-cluster:7.0.10"
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-cluster redis-cluster-node-0 redis-cluster-node-1 redis-cluster-node-2 redis-cluster-node-3 redis-cluster-node-4"
REDIS_CLUSTER_CREATOR: "yes"
REDIS_CLUSTER_REPLICAS: "1"
ports:
- "6380:6379"
depends_on:
- redis-cluster-node-0
- redis-cluster-node-1
- redis-cluster-node-2
- redis-cluster-node-3
- redis-cluster-node-4
redis-cluster-node-0:
image: "docker.io/bitnami/redis-cluster:7.0.10"
ports:
- "6381:6379"
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-cluster redis-cluster-node-0 redis-cluster-node-1 redis-cluster-node-2 redis-cluster-node-3 redis-cluster-node-4"
redis-cluster-node-1:
image: "docker.io/bitnami/redis-cluster:7.0.10"
ports:
- "6382:6379"
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-cluster redis-cluster-node-0 redis-cluster-node-1 redis-cluster-node-2 redis-cluster-node-3 redis-cluster-node-4"
redis-cluster-node-2:
image: "docker.io/bitnami/redis-cluster:7.0.10"
ports:
- "6383:6379"
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-cluster redis-cluster-node-0 redis-cluster-node-1 redis-cluster-node-2 redis-cluster-node-3 redis-cluster-node-4"
redis-cluster-node-3:
image: "docker.io/bitnami/redis-cluster:7.0.10"
ports:
- "6384:6379"
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-cluster redis-cluster-node-0 redis-cluster-node-1 redis-cluster-node-2 redis-cluster-node-3 redis-cluster-node-4"
redis-cluster-node-4:
image: "docker.io/bitnami/redis-cluster:7.0.10"
ports:
- "6385:6379"
environment:
ALLOW_EMPTY_PASSWORD: "yes"
REDIS_NODES: "redis-cluster redis-cluster-node-0 redis-cluster-node-1 redis-cluster-node-2 redis-cluster-node-3 redis-cluster-node-4"
redis-sentinel:
image: docker.io/redis:7
ports:
- "26379:26379"
command: >
sh -c 'echo "bind 0.0.0.0" > /etc/sentinel.conf &&
echo "sentinel monitor master0 redis-master-0 6379 2" >> /etc/sentinel.conf &&
echo "sentinel resolve-hostnames yes" >> /etc/sentinel.conf &&
echo "sentinel down-after-milliseconds master0 10000" >> /etc/sentinel.conf &&
echo "sentinel failover-timeout master0 10000" >> /etc/sentinel.conf &&
echo "sentinel parallel-syncs master0 1" >> /etc/sentinel.conf &&
redis-sentinel /etc/sentinel.conf'
redis-master-0:
image: docker.io/redis:7
ports:
- "6387:6379"
redis-replica-0:
image: docker.io/redis:7
ports:
- "6388:6379"
command:
[
"redis-server",
"--appendonly",
"yes",
"--replicaof",
"redis-master-0",
"6379",
"--repl-diskless-load",
"on-empty-db",
"--protected-mode",
"no"
]
rabbitmq:
image: "docker.io/rabbitmq:3.11.13-management-alpine"
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: "xivs"
RABBITMQ_DEFAULT_PASS: "xivs"
RABBITMQ_PLUGINS_DIR: "/opt/rabbitmq/plugins:/usr/lib/rabbitmq/plugins"
volumes:
- rabbitmq_data:/var/lib/rabbitmq
- ./rabbit/enabled_plugins:/etc/rabbitmq/enabled_plugins
- ./rabbit/plugins:/usr/lib/rabbitmq/plugins
volumes:
postgres-data:
rabbitmq_data: