-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
70 lines (64 loc) · 1.74 KB
/
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
version: "3"
services:
###############
# MYSQL
###############
mysql:
platform: linux/x86_64
image: mysql:8
container_name: local-mysql-dev
environment:
- MYSQL_ROOT_PASSWORD=qwer1234
- MYSQL_DATABASE=public
ports:
- "3306:3306"
command: --ngram_token_size=1
###############
# REDIS as message broker
###############
redis-message-broker:
platform: linux/x86_64
image: redis:6.2
container_name: redis-message-broker
ports:
- 6399:6379
###############
# REDIS Cluster
###############
redis-cluster:
platform: linux/x86_64
image: redis:6.2
container_name: local-redis-dev
volumes:
- ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
ports:
- 6380:6380
- 6381:6381
- 6379:6379
redis-node-1:
network_mode: "service:redis-cluster"
platform: linux/x86_64
image: redis:6.2
container_name: local-redis-dev1
volumes:
- ./docker/redis/redis1.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
redis-node-2:
network_mode: "service:redis-cluster"
platform: linux/x86_64
image: redis:6.2
container_name: local-redis-dev2
volumes:
- ./docker/redis/redis2.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
redis-cluster-entry:
network_mode: "service:redis-cluster"
platform: linux/x86_64
image: redis:6.2
container_name: local-redis-cluster-entry
command: redis-cli --cluster create 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381 --cluster-yes
depends_on:
- redis-cluster
- redis-node-1
- redis-node-2