-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-house.yml
111 lines (100 loc) · 2.84 KB
/
docker-house.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
version: '3.5'
services:
selenium-hub:
image: selenium/hub:3.12.0-boron
container_name: selenium-hub
ports:
- "4444:4444"
networks:
- crawler
chrome:
image: selenium/node-chrome:3.12.0-boron
depends_on:
- selenium-hub
environment:
- HUB_HOST=selenium-hub
- HUB_PORT=4444
networks:
- crawler
crawler_taipei:
build:
context: ./
dockerfile: Dockerfile.crawler
container_name: crawler_taipei
env_file:
- ./.env
environment:
- CITY_ID=1 # the order of element in housing website for selenium working
- CHROME_HOST=selenium-hub
- USE_DOCKER=1 # whether use docker selenium or not
- MONGO_HOST=elastic_gateway
- ES_HOST=elastic_gateway
- ES_PORT=9300
- ES_CERT_PATH=data/elastic_gateway.crt
volumes:
- ./services/data:/data
networks:
- crawler
depends_on: [selenium-hub, chrome]
crawler_new_taipei:
build:
context: ./
dockerfile: Dockerfile.crawler
container_name: crawler_new_taipei
env_file:
- ./.env
environment:
- CITY_ID=3 # the order of element in housing website for selenium working
- CHROME_HOST=selenium-hub
- USE_DOCKER=1 # whether use docker selenium or not
- MONGO_HOST=elastic_gateway
- ES_HOST=elastic_gateway
- ES_PORT=9300
- ES_CERT_PATH=data/elastic_gateway.crt
volumes:
- ./services/data:/data
networks:
- crawler
depends_on: [selenium-hub, chrome]
elastic_gateway:
image: nginx
container_name: elastic_gateway
networks:
- api
- crawler
- es_elastic
volumes:
- ./docker-manifests/subconfigs/nginx-elastic-http.conf:/etc/nginx/conf.d/elastic_http.conf
- ./docker-manifests/subconfigs/nginx-elastic.conf:/etc/nginx/conf.d/elastic_stream.conf
- ./docker-manifests/subconfigs/nginx.conf:/etc/nginx/nginx.conf
- ./services/data/ca.crt:/etc/nginx/certs/ca.crt
- ./services/data/elastic_gateway.crt:/etc/nginx/certs/elastic_gateway.crt
- ./services/data/elastic_gateway.key:/etc/nginx/certs/elastic_gateway.key
- ./services/data/ca.pem:/etc/nginx/certs/ca.pem
- ./services/data/mongo.crt:/etc/nginx/certs/mongo.crt
- ./services/data/mongo.key:/etc/nginx/certs/mongo.key
depends_on: [selenium-hub, chrome]
house_api:
build:
context: ./
dockerfile: Dockerfile.api
container_name: house_api
ports:
- 5000:5000
env_file:
- ./.env
environment:
- MONGO_HOST=elastic_gateway
- APM_URL=http://elastic_gateway:8300
volumes:
- ./services/data:/data
networks:
- api
depends_on: [elastic_gateway]
networks:
api:
driver: bridge
crawler:
driver: bridge
es_elastic:
external: true