-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yaml
93 lines (82 loc) · 1.72 KB
/
compose.yaml
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
name: mmx
version: '0.1'
services:
api:
build: ./dockers/api
ports:
- 20410:8002
networks:
- node-network
volumes:
- type: bind
source: ./dockers/api
target: /mmx_app
- type: bind
source: ./mmx
target: /mmx_app/mmx
secrets:
- mongodb_url
command: sh -c "gunicorn --env MONGODB_URL=${MONGODB_URL} --bind 0.0.0.0:8002 wsgi"
feat_extract:
build: ./dockers/feat_extract
ports:
- 8001:8001
networks:
- node-network
volumes:
- type: bind
source: ./dockers/feat_extract
target: /mmx_app
- type: bind
source: ./mmx/
target: /mmx_app/mmx/
secrets:
- mongodb_url
command: sh -c "watchmedo auto-restart -p \"*.py\" -d . -d mmx -- python server.py"
scrape:
build: ./dockers/scrape
depends_on:
- feat_extract
networks:
- node-network
volumes:
- type: bind
source: ./dockers/scrape
target: /mmx_app/
- type: bind
source: ./mmx/
target: /mmx_app/mmx/
- type: bind
source: ./img
target: /mmx_app/img
secrets:
- mongodb_url
environment:
- MONGODB_URL
- SCRAPE_RUN_MODE
- SCRAPE_JOB_INTERVAL
command: sh -c "bash run.sh"
nginx:
build: ./dockers/nginx
image: faizanbashir/webserver:latest
restart: unless-stopped
tty: true
ports:
- "80:80"
# - "443:443"
volumes:
- nginxdata:/etc/nginx
depends_on:
- api
networks:
- node-network
command: sh -c "nginx -g \"daemon off;\""
volumes:
nginxdata:
driver: local
networks:
node-network:
driver: bridge
secrets:
mongodb_url:
file : ./mongodb_url