-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
88 lines (88 loc) · 2.01 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
services:
app:
build: .
command:
- bash
- -c
- |
python manage.py migrate
python manage.py runserver 0:8000
ports:
- 127.0.0.1:8000:8000
volumes:
- .:/usr/src/app
- db:/usr/src/app/db
environment:
- PROCESS_MANAGER_URL=drunc:10054
- CSC_URL
- CSC_SESSION
drunc:
build: ./drunc_docker_service/
profiles:
- drunc
command:
- bash
- -c
- |
/usr/sbin/sshd &&
drunc-process-manager --log-level debug /process-manager-kafka.json 10054
expose:
- 10054
environment:
- CSC_SESSION
depends_on:
kafka:
condition: service_healthy
drunc-lite:
build:
context: ./drunc_docker_service/
dockerfile: ./Dockerfile_lite
container_name: drunc
profiles:
- drunc-lite
command:
- bash
- -c
- |
service ssh start &&
drunc-process-manager --log-level debug file:///process-manager-kafka.json
expose:
- 10054
depends_on:
kafka:
condition: service_healthy
kafka:
image: bitnami/kafka:latest
environment:
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_PROCESS_ROLES=controller,broker
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka:9093
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
expose:
- 9092
healthcheck:
test: timeout 5s kafka-cluster.sh cluster-id --bootstrap-server localhost:9092
interval: 1s
timeout: 6s
retries: 20
kafka_consumer:
build: .
command:
- bash
- -c
- |
python manage.py kafka_consumer --debug
environment:
- KAFKA_ADDRESS=kafka:9092
volumes:
- .:/usr/src/app
- db:/usr/src/app/db
depends_on:
kafka:
condition: service_healthy
app:
condition: service_started
volumes:
db: