-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-cluster-dragonfly.yaml
95 lines (95 loc) · 2.37 KB
/
docker-compose-cluster-dragonfly.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
version: "3"
services:
redis-cluster-emulator:
container_name: redis-primary
image: 'docker.dragonflydb.io/dragonflydb/dragonfly'
ports:
- "26379:6379"
command: |
sh -c '\
dragonfly --cluster_mode=emulated \
'
redis-acl-helper:
tty: true
container_name: redis-acl-helper
image: 'redis:7.2.2'
links:
- redis-cluster-emulator
command: |
sh -c '\
echo "acl setuser dfuser on >changeme +@all" \
| redis-cli -h redis-cluster-emulator -p 6379 \
'
python-client:
tty: true
container_name: python-client
build:
context: .
dockerfile: python.Dockerfile
volumes:
- ./app/python:/d3fau1t
links:
- redis-cluster-emulator
environment:
- REDIS_MODE=cluster
- REDIS_ADDRS=redis://redis-cluster-emulator:6379
- REDIS_USER=dfuser
- REDIS_PASSWORD=changeme
depends_on:
redis-acl-helper:
condition: service_completed_successfully
python-test:
build:
context: .
dockerfile: python.Dockerfile
container_name: python-test
volumes:
- ./app/python:/d3fau1t
links:
- redis-cluster-emulator
environment:
- REDIS_MODE=cluster
- REDIS_ADDRS=redis://redis-cluster-emulator:6379
- REDIS_USER=dfuser
- REDIS_PASSWORD=changeme
command: |
sh -c 'poetry install && poetry run pytest -s -v'
depends_on:
redis-acl-helper:
condition: service_completed_successfully
node-client:
tty: true
container_name: node-client
build:
context: .
dockerfile: node.Dockerfile
volumes:
- ./app/node:/d3fau1t
links:
- redis-cluster-emulator
environment:
- REDIS_MODE=cluster
- REDIS_ADDRS=redis://redis-cluster-emulator:6379
- REDIS_USER=dfuser
- REDIS_PASSWORD=changeme
depends_on:
redis-acl-helper:
condition: service_completed_successfully
go-client:
tty: true
container_name: go-client
build:
context: .
dockerfile: go.Dockerfile
volumes:
- ./app/go/src:/d3fau1t/src
links:
- redis-cluster-emulator
environment:
- REDIS_MODE=cluster
- REDIS_ADDRS=redis://redis-cluster-emulator:6379
- REDIS_USER=dfuser
- REDIS_PASSWORD=changeme
depends_on:
redis-acl-helper:
condition: service_completed_successfully