-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
129 lines (122 loc) · 2.76 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
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
version: '3.3'
services:
# Primary services
app:
build:
context: .
dockerfile: docker/Dockerfile
env_file: .env
image: pemi-app
container_name: pemi-app
command: jupyter lab . --ip=0.0.0.0 --allow-root --no-browser
depends_on:
- db
networks:
- services
volumes:
- ./.data/services/ap/bash_history:/root/.bash_history
- .:/app
- ./.data/spark:/tmp/data
ports:
- "${HOST_JUPYTER_PORT}:8888"
# Upstream services
db:
image: postgres:9.6
container_name: pemi-db
hostname: pemi-db
env_file: .env
volumes:
- ./.data/db:/var/lib/postgresql/data
ports:
- "${HOST_POSTGRES_PORT}:5432"
networks:
- services
spark-master:
image: pemi-spark
container_name: pemi-spark-master
build:
context: .
dockerfile: docker/Dockerfile.spark
command: bin/spark-class org.apache.spark.deploy.master.Master -h spark-master
hostname: spark-master
environment:
MASTER: spark://spark-master:7077
SPARK_CONF_DIR: /conf
SPARK_PUBLIC_DNS: 127.0.0.1
expose:
- 7001
- 7002
- 7003
- 7004
- 7005
- 7006
- 7077
- 6066
ports:
- 4040:4040
- 6066:6066
- 7077:7077
- 8080:8080
volumes:
- ./docker/spark/conf/spark-master:/conf
- ./.data/spark:/tmp/data
networks:
- services
spark-worker-1:
image: pemi-spark
container_name: pemi-spark-worker-1
command: bin/spark-class org.apache.spark.deploy.worker.Worker spark://spark-master:7077
hostname: spark-worker-1
environment:
SPARK_CONF_DIR: /conf
SPARK_PUBLIC_DNS: 127.0.0.1
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 2g
SPARK_WORKER_PORT: 8881
SPARK_WORKER_WEBUI_PORT: 8081
links:
- spark-master
expose:
- 7012
- 7013
- 7014
- 7015
- 7016
- 8881
ports:
- 8081:8081
volumes:
- ./docker/spark/conf/spark-worker-1:/conf
- ./.data/spark:/tmp/data
networks:
- services
spark-worker-2:
image: pemi-spark
container_name: pemi-spark-worker-2
command: bin/spark-class org.apache.spark.deploy.worker.Worker spark://spark-master:7077
hostname: spark-worker-2
environment:
SPARK_CONF_DIR: /conf
SPARK_PUBLIC_DNS: 127.0.0.1
SPARK_WORKER_CORES: 2
SPARK_WORKER_MEMORY: 2g
SPARK_WORKER_PORT: 8882
SPARK_WORKER_WEBUI_PORT: 8082
links:
- spark-master
expose:
- 7022
- 7023
- 7024
- 7025
- 7026
- 8882
ports:
- 8082:8082
volumes:
- ./docker/spark/conf/spark-worker-2:/conf
- ./.data/spark:/tmp/data
networks:
- services
networks:
services: