-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 1.63 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
services:
api:
build: .
ports:
- "8080:8080"
command: bash -c "uvicorn app.api:app
--log-config ./logging.ini
--host 0.0.0.0 --port 8080
--lifespan=on --use-colors --loop uvloop --http httptools
--reload --log-level debug
"
volumes:
- ./app:/home/code/app
- ./worker-data:/worker-data
environment:
FAUST_BROKER_URL: "kafka://kafka:29092"
APP_DATADIR: "/worker-data"
APP_TABLEDIR: "/worker-data"
depends_on:
- kafka
worker:
build: .
command: bash -c "python -m app.worker worker -l info "
volumes:
- ./app:/home/code/app
- ./worker-data:/worker-data
environment:
FAUST_BROKER_URL: "kafka://kafka:29092"
APP_DATADIR: "/worker-data"
APP_TABLEDIR: "/worker-data"
depends_on:
- kafka
- api
kafka:
image: confluentinc/cp-kafka:latest
ports:
- "29092"
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
volumes:
- kafka-data:/var/lib/kafka/data
- kafka-secrets:/etc/kafka/secrets
depends_on:
- zookeeper
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- "32181"
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_LOG4J_ROOT_LOGLEVEL: WARN
volumes:
- zookeeper-data:/var/lib/zookeeper/data
- zookeeper-log:/var/lib/zookeeper/log
- zookeeper-secrets:/etc/zookeeper/secrets
volumes:
kafka-data: { }
kafka-secrets: { }
zookeeper-data: { }
zookeeper-log: { }
zookeeper-secrets: { }