-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
101 lines (94 loc) · 1.95 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
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.0
environment:
- xpack.security.enabled=false
volumes:
- ./resources/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
healthcheck:
test: [ "CMD", "curl", "-s", "-f", "http://localhost:9200/_cat/health" ]
interval: 3s
timeout: 3s
retries: 50
ports:
- 9200:9200
networks:
- elasticsearch
- kibana
kibana:
build: ./resources/kibana
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-s", "-f", "http://localhost:5601/api/status" ]
interval: 3s
timeout: 3s
retries: 50
ports:
- 5601:5601
environment:
- setup.ilm.overwrite=true
networks:
- kibana
mysql:
container_name: mysql
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'db'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'pass'
MYSQL_ROOT_PASSWORD: 'password'
networks:
- db
ports:
- "3306:3306"
redis:
image: 'bitnami/redis:latest'
environment:
REDIS_PASSWORD: 'PASSWORD'
restart: always
networks:
- redis
ports:
- "6379:6379"
chat:
build:
context: ./
dockerfile: ./resources/chat/Dockerfile
ports:
- "8008"
networks:
- loadbalancing
- db
- redis
- elasticsearch
- kibana
depends_on:
- redis
- mysql
- elasticsearch
- kibana
deploy:
replicas: 2
restart: always
healthcheck:
test: [ "CMD", "curl", "-s", "-f", "http://localhost:8008/health_check" ]
interval: 5s
timeout: 5s
retries: 100
nginx:
build: ./resources/nginx
ports:
- "80:80"
networks:
- loadbalancing
depends_on:
- chat
networks:
loadbalancing:
db:
redis:
elasticsearch:
kibana: