forked from maleterian/py_spark_test_tasks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (53 loc) · 1.2 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
x-spark-worker:
environment:
&spark-worker-env
SPARK_MASTER : spark://spark-master:7077
SPARK_WORKER_CORES : 2
SPARK_WORKER_MEMORY : 2G
SPARK_DRIVER_MEMORY : 1G
SPARK_EXECUTOR_MEMORY : 1G
SPARK_WORKLOAD : worker
depends_on:
- spark-master
x-spark-common:
&spark-common
image: ${DOCKER_SPARK_IMAGE:-cluster-apache-spark:3.0.2}
volumes:
- ./src:/opt/spark-apps
- ./data:/opt/spark-data
- ./src/test:/opt/spark-apps/test
- ./log:/opt/spark-log
- ./bash:/opt/bash
services:
spark-master:
<<: *spark-common
ports:
- "8000:8000"
- "9090:8080"
- "7077:7077"
- "80:80"
environment:
- SPARK_LOCAL_IP=spark-master
- SPARK_WORKLOAD=master
spark-worker-a:
<<: *spark-common
environment:
<<: *spark-worker-env
SPARK_LOCAL_IP: spark-worker-a
ports:
- "9091:8080"
- "7001:7000"
spark-worker-b:
<<: *spark-common
environment:
<<: *spark-worker-env
SPARK_LOCAL_IP: spark-worker-b
ports:
- "9092:8080"
- "7002:7000"
# demo-database:
# image: postgres:11.7-alpine
# ports:
# - "5432:5432"
# environment:
# - POSTGRES_PASSWORD=casa1234