-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.23 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
version: "3"
services:
# Chromedriver service
chrome:
image: selenium/node-chrome:4.1.3-20220405
shm_size: 2gb
depends_on:
- hub
environment:
- SE_EVENT_BUS_HOST=hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
ports:
- "6900:5900"
# Selenium hub service
# Make sure you're exposing ports like below
hub:
image: selenium/hub:latest
container_name: hub
restart: on-failure
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
# Scraper service
# Uses wait-for-it script to make sure that hub is up and running before it starts scraping
webtric:
network_mode: host
container_name: webtric
build:
context: .
restart: on-failure
command: ["./wait-for-it.sh", "localhost:4444", "--", "${APP}", "/home/webtric", "remote"]
volumes:
- webtric:/home/webtric/
# Jupyter service
# Would be used to render resulting CSV
jupyter:
image: jupyter/datascience-notebook:latest
environment:
- JUPYTER_TOKEN=webtric
container_name: jupyter
volumes:
- webtric:/home/webtric/
ports:
- 8888:8888
# Volume to share data between containers
volumes:
webtric:
external: false