-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
129 lines (123 loc) · 3.19 KB
/
docker-compose.test.yml
File metadata and controls
129 lines (123 loc) · 3.19 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
services:
valkey:
image: valkey/valkey:8-alpine
container_name: betterdb-test-valkey
ports:
- "6390:6379"
command: >
valkey-server
--requirepass devpassword
--slowlog-log-slower-than 0
--commandlog-request-larger-than 100
--commandlog-reply-larger-than 100
--commandlog-slow-execution-max-len 128
--commandlog-large-request-max-len 128
--commandlog-large-reply-max-len 128
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 3s
retries: 3
redis:
image: redis:8-alpine
container_name: betterdb-test-redis
ports:
- "6392:6379"
command: >
redis-server
--requirepass devpassword
--appendonly yes
--slowlog-log-slower-than 10000
--slowlog-max-len 128
--latency-monitor-threshold 100
--acllog-max-len 128
healthcheck:
test: ["CMD", "redis-cli", "-a", "devpassword", "ping"]
interval: 5s
timeout: 3s
retries: 3
postgres:
image: postgres:16-alpine
container_name: betterdb-test-postgres
ports:
- "5433:5432"
environment:
POSTGRES_USER: betterdb
POSTGRES_PASSWORD: devpassword
POSTGRES_DB: betterdb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U betterdb"]
interval: 5s
timeout: 3s
retries: 3
tmpfs:
- /var/lib/postgresql/data
valkey-cluster-1:
image: valkey/valkey:8-alpine
container_name: betterdb-test-cluster-1
network_mode: host
command: >
valkey-server
--port 6401
--cluster-enabled yes
--cluster-config-file nodes.conf
--cluster-node-timeout 5000
--appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6401", "ping"]
interval: 3s
timeout: 2s
retries: 5
valkey-cluster-2:
image: valkey/valkey:8-alpine
container_name: betterdb-test-cluster-2
network_mode: host
command: >
valkey-server
--port 6402
--cluster-enabled yes
--cluster-config-file nodes.conf
--cluster-node-timeout 5000
--appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6402", "ping"]
interval: 3s
timeout: 2s
retries: 5
valkey-cluster-3:
image: valkey/valkey:8-alpine
container_name: betterdb-test-cluster-3
network_mode: host
command: >
valkey-server
--port 6403
--cluster-enabled yes
--cluster-config-file nodes.conf
--cluster-node-timeout 5000
--appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6403", "ping"]
interval: 3s
timeout: 2s
retries: 5
valkey-cluster-init:
image: valkey/valkey:8-alpine
container_name: betterdb-test-cluster-init
network_mode: host
depends_on:
valkey-cluster-1:
condition: service_healthy
valkey-cluster-2:
condition: service_healthy
valkey-cluster-3:
condition: service_healthy
restart: "no"
entrypoint: >
sh -c "
valkey-cli --cluster create
127.0.0.1:6401
127.0.0.1:6402
127.0.0.1:6403
--cluster-replicas 0 --cluster-yes &&
echo 'Cluster created successfully'
"