-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
107 lines (100 loc) · 2.24 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
version: '3.3'
services:
# engine
wehpu-engine1:
build: .
ports:
- 3000
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- ./vendor:/usr/src/app/vendor
- ./logs:/usr/src/app/logs
- ./tmpdir:/usr/src/app/tmpdir
restart: always
links:
- mongodb-master
- mongodb-slave1
- mongodb-slave2
wehpu-engine2:
build: .
ports:
- 3000
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- ./vendor:/usr/src/app/vendor
- ./logs:/usr/src/app/logs
- ./tmpdir:/usr/src/app/tmpdir
restart: always
links:
- mongodb-master
- mongodb-slave1
- mongodb-slave2
wehpu-engine3:
build: .
ports:
- 3000
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
- ./vendor:/usr/src/app/vendor
- ./logs:/usr/src/app/logs
- ./tmpdir:/usr/src/app/tmpdir
restart: always
links:
- mongodb-master
- mongodb-slave1
- mongodb-slave2
# spider
wehpu-spider:
build: ./spider
ports:
- 3000
volumes:
- ./spider:/usr/src/app/spider
- /usr/src/app/spider/node_modules
- ./spider/logs:/usr/src/app/spider/logs
- ./spider/tmpdir:/usr/src/app/spider/tmpdir
restart: always
links:
- mongodb-master
- mongodb-slave1
- mongodb-slave2
# mongodb
mongodb-master:
build: ./builds/mongo
restart: always
volumes:
- /data/mongodb-wehpu/mongodb-master:/data/db
environment:
ROLE: mongodb-master
SLAVE1: mongodb-slave1
SLAVE2: mongodb-slave2
hostname: mongodb-master
container_name: mongodb-master
mongodb-slave1:
build: ./builds/mongo
restart: always
volumes:
- /data/mongodb-wehpu/mongodb-slave1:/data/db
hostname: mongodb-slave1
container_name: mongodb-slave1
mongodb-slave2:
build: ./builds/mongo
restart: always
volumes:
- /data/mongodb-wehpu/mongodb-slave2:/data/db
hostname: mongodb-slave2
container_name: mongodb-slave2
# load-balance
load-balance:
build: ./builds/haproxy
restart: always
ports:
- 443:443
- 80:80
links:
- wehpu-engine1
- wehpu-engine2
- wehpu-engine3