-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
45 lines (42 loc) · 1.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
version: '3'
services:
spark-master:
container_name: spark-master
hostname: spark-master
build:
context: .
dockerfile: Dockerfile.spark
command: bin/spark-class org.apache.spark.deploy.master.Master
volumes:
- ./config:/opt/bitnami/spark/config
- ./src/jobs:/opt/bitnami/spark/src/jobs
- ./data:/opt/bitnami/spark/data
- ./requirements.txt:/requirements.txt
ports:
- "9090:8080"
- "7077:7077"
networks:
- zabull
spark-worker: &worker
container_name: spark-worker
hostname: spark-worker
build:
context: .
dockerfile: Dockerfile.spark
command: bin/spark-class org.apache.spark.deploy.worker.Worker spark://spark-master:7077
volumes:
- ./config:/opt/bitnami/spark/config
- ./src/jobs:/opt/bitnami/spark/src/jobs
- ./data:/opt/bitnami/spark/data
- ./requirements.txt:/requirements.txt
depends_on:
- spark-master
environment:
SPARK_MODE: worker
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 1g
SPARK_MASTER_URL: spark://spark-master:7077
networks:
- zabull
networks:
zabull: