-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
179 lines (168 loc) · 4.37 KB
/
docker-compose.yml
File metadata and controls
179 lines (168 loc) · 4.37 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.5.0
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- hackernews-network
kafka:
image: confluentinc/cp-kafka:7.5.0
hostname: kafka
container_name: kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
- "29092:29092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,PLAINTEXT_HOST://0.0.0.0:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_LOG_RETENTION_HOURS: 168
healthcheck:
test: ["CMD", "/usr/bin/kafka-broker-api-versions", "--bootstrap-server", "localhost:9092"]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
networks:
- hackernews-network
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: kafka-ui
depends_on:
- kafka
ports:
- "8082:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
KAFKA_CLUSTERS_0_ZOOKEEPER: zookeeper:2181
networks:
- hackernews-network
notebook:
build:
context: ./notebooks
dockerfile: Dockerfile
container_name: jupyter
depends_on:
kafka:
condition: service_healthy
spark:
condition: service_started
ports:
- "8888:8888"
- "4040:4040"
environment:
JUPYTER_ENABLE_LAB: "yes"
command: start-notebook.py --NotebookApp.token=''
volumes:
- ./notebooks:/home/jovyan/work
networks:
- hackernews-network
spark:
image: grosinosky/spark:3.5.3
environment:
- SPARK_MODE=master
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- SPARK_USER=spark
ports:
- '8080:8080'
- '7077:7077'
networks:
- hackernews-network
spark-worker:
image: grosinosky/spark:3.5.3
depends_on:
spark:
condition: service_started
environment:
- SPARK_MODE=worker
- SPARK_MASTER_URL=spark://spark:7077
- SPARK_WORKER_MEMORY=1G
- SPARK_WORKER_CORES=2
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- SPARK_USER=spark
ports:
- '8081:8081'
networks:
- hackernews-network
garage:
image: grosinosky/garage:v2.1.0
container_name: garage
ports:
- "3900:3900"
- "3901:3901"
- "3902:3902"
- "3903:3903"
environment:
RUST_LOG: garage=info
volumes:
- garage-data:/var/lib/garage/data
- garage-meta:/var/lib/garage/meta
restart: unless-stopped
networks:
- hackernews-network
garage-webui:
image: khairul169/garage-webui:1.1.0
container_name: garage-webui
restart: unless-stopped
ports:
- 3909:3909
environment:
API_BASE_URL: "http://garage:3903"
API_ADMIN_KEY: "changeme1234567890"
S3_ENDPOINT_URL: "http://garage:3900"
networks:
- hackernews-network
hn-producer:
build:
context: ./
dockerfile: utils/Dockerfile
container_name: hn-producer
depends_on:
kafka:
condition: service_healthy
networks:
- hackernews-network
environment:
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile
container_name: dashboard
depends_on:
- garage
ports:
- "8501:8501"
environment:
GARAGE_ENDPOINT: "http://garage:3900"
GARAGE_ACCESS_KEY: "GK2ae23cad2bbbf648143b1b8c"
GARAGE_SECRET_KEY: "997e31832cbc9c78a2d919897f1cc9d63ad2c628464a7fba3a55f972c31790ee"
GOLD_PATH: "s3a://gold/hackernews"
REFRESH_INTERVAL: "30"
networks:
- hackernews-network
volumes:
garage-meta:
garage-data:
networks:
hackernews-network:
driver: bridge