Repository navigation
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
116 lines (110 loc) · 3.15 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
116 lines (110 loc) · 3.15 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
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-bundle:9.1-alpine
container_name: betterdb-test-cluster-1
network_mode: host
volumes:
- ./docker/valkey-cluster-node.conf:/etc/valkey/cluster-node.conf:ro
command: ["/etc/valkey/cluster-node.conf", "--port", "6401"]
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6401", "ping"]
interval: 3s
timeout: 2s
retries: 5
valkey-cluster-2:
image: valkey/valkey-bundle:9.1-alpine
container_name: betterdb-test-cluster-2
network_mode: host
volumes:
- ./docker/valkey-cluster-node.conf:/etc/valkey/cluster-node.conf:ro
command: ["/etc/valkey/cluster-node.conf", "--port", "6402"]
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6402", "ping"]
interval: 3s
timeout: 2s
retries: 5
valkey-cluster-3:
image: valkey/valkey-bundle:9.1-alpine
container_name: betterdb-test-cluster-3
network_mode: host
volumes:
- ./docker/valkey-cluster-node.conf:/etc/valkey/cluster-node.conf:ro
command: ["/etc/valkey/cluster-node.conf", "--port", "6403"]
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6403", "ping"]
interval: 3s
timeout: 2s
retries: 5
valkey-cluster-init:
image: valkey/valkey-bundle:9.1-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'