-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
64 lines (61 loc) · 1.42 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
version: '3.8'
services:
zookeeper:
image: 'wurstmeister/zookeeper:latest'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'wurstmeister/kafka:latest'
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=1
- 'KAFKA_LISTENERS=PLAINTEXT://:9092'
- 'KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092'
- 'KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181'
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
mysql-container:
image: 'mysql:latest'
environment:
- MYSQL_ROOT_PASSWORD=root-pw
- MYSQL_DATABASE=chat-app
- MYSQL_USER=user
- MYSQL_PASSWORD=1234
ports:
- '3306:3306'
redis-container:
image: 'redis:latest'
ports:
- '6389:6379'
node-app:
build:
dockerfile: DockerfileServer
restart: unless-stopped
ports:
- '3000:3000'
depends_on:
- mysql-container
- redis-container
- kafka
labels:
- "autoheal=true"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 8s
timeout: 5s
retries: 3
start_period: 5s
autoheal:
image: willfarrell/autoheal:latest
tty: true
restart: always
environment:
- AUTOHEAL_INTERVAL=10
- AUTOHEAL_START_PERIOD=15
- AUTOHEAL_DEFAULT_STOP_TIMEOUT=10
volumes:
- /var/run/docker.sock:/var/run/docker.sock