-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (75 loc) · 1.85 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
version: '2'
services:
spark-master:
user: root
hostname: spark-master
working_dir: /opt/spark
build: .
environment:
- SPARK_NO_DAEMONIZE=true
volumes:
- datalake:/opt/datalake
- warehouse:/opt/warehouse
ports:
- '7077:7077'
- '8080:8080'
command: ./sbin/start-master.sh
spark-worker:
user: root
working_dir: /opt/spark
build: .
environment:
- SPARK_NO_DAEMONIZE=true
volumes:
- datalake:/opt/datalake
- warehouse:/opt/warehouse
command: ./sbin/start-worker.sh spark://spark-master:7077
jupyter:
user: root
working_dir: /opt/spark
build:
context: ./jupyter
volumes:
- ./sparkcode:/opt/spark/sparkcode
- datalake:/opt/datalake
- warehouse:/opt/warehouse
environment:
- PYTHONPATH=/opt/spark/python:/opt/spark/python/lib/py4j-0.10.9.7-src.zip
ports:
- '8888:8888'
command: jupyter lab --allow-root --NotebookApp.token=secret123 --ip 0.0.0.0 --no-browser
extractor:
build:
context: ./extractor
volumes:
- datalake:/opt/datalake
- warehouse:/opt/warehouse
tfidf_calculator:
build:
context: ./sparkcode
working_dir: /opt/app
volumes:
- datalake:/opt/datalake
- warehouse:/opt/warehouse
rest:
user: root
build:
context: ./rest
environment:
- PYTHONPATH=/opt/spark/python:/opt/spark/python/lib/py4j-0.10.9.7-src.zip:/opt/app/
volumes:
- warehouse:/opt/warehouse
- ./rest:/opt/app ## uncomment for rapid development.
ports:
- '8000:8000'
volumes:
datalake:
warehouse:
# Test with:
# docker-compose build
# docker-compose up
# docker-compose down
# docker-compose exec extractor bash
# docker-compose up -d
# docker-compose up --scale spark-worker=3
# docker cp 065ade4fa188:/opt/warehouse ./test-warehouse/