-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
97 lines (89 loc) · 2.13 KB
/
docker-compose.yaml
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
version: '3.9'
name: "realtime-stock-market"
services:
zookeeper:
image: bitnami/zookeeper:latest
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
stock-net:
ipv4_address: 172.28.1.1
kafka:
image: bitnami/kafka:latest
ports:
- "9092:9092"
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://172.28.1.2:9092
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
networks:
stock-net:
ipv4_address: 172.28.1.2
volumes:
- ./scripts/init-kafka.sh:/init-kafka.sh
# entrypoint: ["/bin/bash", "init-kafka.sh"]
restart: always
cassandra:
image: cassandra:latest
ports:
- "9042:9042"
volumes:
- ./init-cassandra:/init-cassandra
- ./scripts/init-cassandra-schema.sh:/init-cassandra-schema.sh
environment:
- CASSANDRA_START_RPC=true
networks:
stock-net:
ipv4_address: 172.28.1.3
# entrypoint: ["/bin/bash", "init-cassandra-schema.sh"]
restart: always
spark:
image: bitnami/spark:latest
volumes:
- ./spark:/opt/bitnami/spark/jobs
- ./scripts/submit-spark-job.sh:/opt/bitnami/spark/submit-spark-job.sh
ports:
- "8080:8080"
depends_on:
- kafka
networks:
stock-net:
ipv4_address: 172.28.1.4
# entrypoint: ["sh", "-c", "./submit-spark-job.sh"]
restart: always
kafka_producer:
build:
context: ./kafka-producer
dockerfile: kafka_producer.dockerfile
depends_on:
- kafka
networks:
stock-net:
ipv4_address: 172.28.1.8
restart: always
plotly:
build:
context: ./plotly
dockerfile: plotly.dockerfile
volumes:
- ./plotly/dashboard.py:/dashboard.py
ports:
- "8050:8050"
depends_on:
- cassandra
networks:
stock-net:
ipv4_address: 172.28.1.9
restart: always
networks:
stock-net:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16