-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
58 lines (58 loc) · 1.5 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
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
env_file: .env
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
ports:
- 29092:29092
env_file: .env
consumer:
build: scripts
depends_on:
- kafka
env_file: .env
entrypoint: ["./wait-for-it.sh", "kafka:9092", "--timeout=0", "--", "python", "-u", "consumer.py"]
db_to_kafka:
build: scripts
depends_on:
- kafka
- db
env_file: .env
entrypoint: ["./wait-for-it.sh", "db:3306", "--timeout=0", "--", "python", "-u", "db_to_kafka.py"]
automatic:
build: scripts
depends_on:
- db_to_kafka
env_file: .env
entrypoint: ["./wait-for-it.sh", "db:3306", "--timeout=0", "--", "python", "-u", "automatic_controller.py"]
db:
image: mysql:8.0
depends_on:
- kafka
command: --default-authentication-plugin=mysql_native_password
env_file: .env
volumes:
- ./db/dump:/docker-entrypoint-initdb.d
- ./db/conf:/etc/mysql/conf.d
# Decomment to save data in docker volume
# - persistent:/var/lib/mysql
server:
build: server
ports:
- "80:5000"
depends_on:
- kafka
- db
env_file: .env
entrypoint: ["./wait-for-it.sh", "db:3306", "--timeout=0", "--", "python", "-u", "server.py"]
logs:
build: scripts
depends_on:
- kafka
- db
env_file: .env
entrypoint: ["./wait-for-it.sh", "db:3306", "--timeout=0", "--", "python", "-u", "logs.py"]