-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (38 loc) · 1.42 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
version: '2'
#NETWORKING#################################################################
# By default Compose will set up a private network for the cluster #########
# Each container will join the network and can be reached by other #########
# containers at a host-name identical to the containres name. #########
# It's necessary to keep the master container_name as 'master' #########
# COMPOSE_PROJECT_NAME that is defined on .env file will also #########
# determine the name of the network that spark nodes are running on.#########
# If that variable is not defined the network name will be #########
# `{dir-name}_default` #########
############################################################################
volumes:
data:
external: true
services:
master:
build: .
container_name: master
ports:
- "8080:8080"
- "7077:7077"
- "8888:8888"
- "8081:8081"
command: ["/usr/bin/supervisord", "--configuration=/opt/conf/master.conf"]
environment:
- PYSPARK_PYTHON=python3.6
- PYSPARK_DRIVER_PYTHON=ipython
volumes:
- "data:/data"
#---------------------------------------
worker:
build: .
command: ["/usr/bin/supervisord", "--configuration=/opt/conf/worker.conf"]
environment:
- PYSPARK_PYTHON=python3.6
- PYSPARK_DRIVER_PYTHON=ipython
volumes:
- "data:/data"