-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
126 lines (116 loc) · 2.92 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
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
version: "3"
services:
backend:
container_name: backend
image: ${SPRING_BOOT_IMAGE}
restart: on-failure
ports:
- "8081:8081"
healthcheck:
interval: 5s
timeout: 1s
retries: 2
networks:
- default_bridge
redis-master-1:
container_name: redis-master-1
image: redis
volumes:
- ./redis/config/redis-master-1.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
ports:
- 7001:7001
- 7002:7002
- 7003:7003
- 7101:7101
- 7102:7102
- 7103:7103
networks:
- default_bridge
redis-master-2:
container_name: redis-master-2
image: redis
volumes:
- ./redis/config/redis-master-2.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
networks:
- default_bridge
redis-master-3:
container_name: redis-master-3
image: redis
volumes:
- ./redis/config/redis-master-3.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
networks:
- default_bridge
redis-slave-1:
container_name: redis-slave-1
image: redis
volumes:
- ./redis/config/redis-slave-1.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
networks:
- default_bridge
redis-slave-2:
container_name: redis-slave-2
image: redis
volumes:
- ./redis/config/redis-slave-2.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
networks:
- default_bridge
redis-slave-3:
container_name: redis-slave-3
image: redis
volumes:
- ./redis/config/redis-slave-3.conf:/etc/redis.conf
command: redis-server /etc/redis.conf
networks:
- default_bridge
redis-cluster-entry:
image: redis
container_name: redis-cluster
command: redis-cli --cluster create redis-master-1:7001 redis-master-2:7002 redis-master-3:7003 redis-slave-1:7101 redis-slave-2:7102 redis-slave-3:7103 --cluster-replicas 1 --cluster-yes
networks:
- default_bridge
depends_on:
- redis-master-1
- redis-master-2
- redis-master-3
- redis-slave-1
- redis-slave-2
- redis-slave-3
elasticsearch:
container_name: elasticsearch
restart: always
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.1
ports:
- "9200:9200"
- "9300:9300"
environment:
- ES_JAVA_OPTS=-Xms2048m -Xmx2048m
- discovery.type=single-node
- xpack.security.enabled=false
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./elk/elasticsearch/data:/usr/share/elasticsearch/data
networks:
- default_bridge
logstash:
container_name: logstash
build:
context: ./elk
volumes:
- ./elk/logstash/pipeline/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
ports:
- "5044:5044"
environment:
- "xpack.monitoring.enabled=false"
networks:
- default_bridge
networks:
default_bridge:
driver: bridge