-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 1.08 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
version: '3.8'
services:
mongo:
image: mongo:latest
ports:
- "27017:27017"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
spark-master:
image: bitnami/spark:3.1.2
environment:
- SPARK_MODE=master
- SPARK_MASTER_PORT=7077
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 10s
timeout: 5s
retries: 5
spark-worker:
image: bitnami/spark:3.1.2
environment:
- SPARK_MODE=worker
- SPARK_MASTER_URL=spark://spark-master:7077
depends_on:
spark-master:
condition: service_healthy
spark-app:
image: ${DOCKER_IMAGE}
build:
context: .
dockerfile: spark/Dockerfile
args:
BUILDKIT_INLINE_CACHE: "1"
cache_from:
- ${DOCKER_IMAGE}:latest
depends_on:
mongo:
condition: service_healthy
spark-master:
condition: service_healthy
environment:
- PYTHONUNBUFFERED=1