-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
146 lines (128 loc) · 3.23 KB
/
Copy pathdocker-compose.yml
File metadata and controls
146 lines (128 loc) · 3.23 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: '2'
services:
zookeeper:
image: 'docker.io/bitnami/zookeeper:3-debian-10'
ports:
- '2181:2181'
# volumes:
# - 'zookeeper_data:/bitnami'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'docker.io/bitnami/kafka:2-debian-10'
ports:
- '9092:9092'
# volumes:
# - 'kafka_data:/bitnami'
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
producer:
container_name: timeseries-producer
image: 'node:12'
volumes:
- ./timeseries-producer:/home/task
working_dir: /home/task
command: node index.js
depends_on:
- kafka
spark:
build: ./spark
# image: docker.io/bitnami/spark:3-debian-10
environment:
- SPARK_MODE=master
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
ports:
- '8080:8080'
depends_on:
- 'kafka'
user: root
volumes:
- ./spark:/opt/bitnami/spark/candlestick
command: 'bin/spark-submit --packages org.apache.spark:spark-sql-kafka-0-10_2.12:3.0.0 candlestick/main.py kafka:9092 bitcoin'
# spark-worker-1:
# build: ./spark-regression
# environment:
# - SPARK_MODE=worker
# - SPARK_MASTER_URL=spark://spark:7077
# - SPARK_WORKER_MEMORY=1G
# - SPARK_WORKER_CORES=1
# - SPARK_RPC_AUTHENTICATION_ENABLED=no
# - SPARK_RPC_ENCRYPTION_ENABLED=no
# - SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
# - SPARK_SSL_ENABLED=no
# spark-worker-2:
# build: ./spark-regression
# environment:
# - SPARK_MODE=worker
# - SPARK_MASTER_URL=spark://spark:7077
# - SPARK_WORKER_MEMORY=1G
# - SPARK_WORKER_CORES=1
# - SPARK_RPC_AUTHENTICATION_ENABLED=no
# - SPARK_RPC_ENCRYPTION_ENABLED=no
# - SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
# - SPARK_SSL_ENABLED=no
consumer:
container_name: consumer-candlesticks
image: 'node:12'
volumes:
- ./consumer:/home/task
working_dir: /home/task
command: node index.js
restart: on-failure
depends_on:
- kafka
mongo:
image: mongo:4.2
# restart: always
ports:
- "27017:27017"
# volumes:
# - task:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
mongo-express:
image: mongo-express
# restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: password
frontend:
container_name: frontend
image: 'node:12'
ports:
- 80:80
volumes:
- ./frontend:/home/task
working_dir: /home/task
command: node index.js
restart: on-failure
depends_on:
- kafka
backend:
container_name: backend
build: ./backend
volumes:
- ./backend:/home/task
working_dir: /home/task
command: python -u api/main.py
restart: on-failure
environment:
- PYTHONUNBUFFERED=0
depends_on:
- kafka
- frontend
- mongo
# volumes:
# zookeeper_data:
# driver: local
# kafka_data:
# driver: local