-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose-dev.yml
182 lines (163 loc) · 5.05 KB
/
docker-compose-dev.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
version: "3"
# The docker-compose.yml file defines 8 services of DockerFinder
# The services are divided in three groups:
# 1) analysis: crawler, scanner, rabbitmq
# 2) discovery: webapp, software-server, sotware_db
# 3) storage:: images_server, images_db
services:
############### ANALYSIS PHASE ####################
crawler:
image: diunipisocc/docker-finder:crawler
build:
context: analysis
dockerfile: ./Dockerfile_crawler
# command: [crawl,'--save-url=/data/crawler/lasturl.txt',
# '--amqp-url=amqp://guest:guest@rabbitmq:5672',
# '--images-url=http://images_server:3000/api/images/',
# '--queue=images',
# '--force-page=True',
# #'--si=10000',
# '--random=False',
# '--fp=1',
# '--ps=100',
# '--policy=stars_first',
# '--min-stars=3',
# '--min-pulls=0',
# #'--only-official',
# '--only-automated',
# ]
command: [crawl-one, 'superrogue/mediumdefine']
#,'--si=100'] #, '--fp=100', '--ps=10']
volumes:
- /data/crawler/
- ./analysis/pyFinder/:/code
deploy:
placement:
constraints:
- node.hostname==swarm-manager
rabbitmq:
image: rabbitmq:3-management
hostname: rabbitmq
restart: on-failure:3
ports:
- 8082:15672
volumes:
- /var/lib/rabbitmq
deploy:
placement:
constraints:
- node.hostname==swarm-manager
scanner:
image: diunipisocc/docker-finder:scanner
build:
context: analysis
dockerfile: ./Dockerfile_scanner
command: [run, '--images-url=http://neri.di.unipi.it:3000/api/images/',
'--queue=images',
'--key=images.scan',
'--software-url=http://neri.di.unipi.it:3001/api/software',
'--rmi']
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./analysis/pyFinder/:/code
deploy:
mode: replicated
replicas: 10
placement:
constraints:
- node.hostname != swarm-manager
restart_policy:
condition: on-failure
# update_config:
# parallelism: 2
# delay: 10s
# restart_policy:
# condition: on-failure
checker:
image: diunipisocc/docker-finder:checker
build:
context: analysis
dockerfile: ./Dockerfile_checker
command: [run, '--interval=30','--path-logging=/data/crawler/log/stats.log','--images-url=http://images_server:3000/api/images', '--queue=images', '--key=images.scan','--amqp-url=amqp://guest:guest@rabbitmq:5672']
#command: verify
volumes:
- /dockerfinder/checker/log:/data/crawler/log
#
# #####################################################
# ############### DISCOVERY PHASE ####################
# #####################################################
#
software_server:
build: discovery/softwareService/software_server
image: diunipisocc/docker-finder:software_server
hostname: software_server
ports:
- "3001:3001"
depends_on:
- software_db
deploy:
placement:
constraints:
- node.hostname==swarm-manager
software_db:
image: mongo:3
hostname: software_db
volumes:
- /data/db # /data/db is the deafult directory where mogno stores the databases.
deploy:
placement:
constraints:
- node.hostname == swarm-manager
webapp:
build: discovery/webapp/
image: diunipisocc/docker-finder:webapp
restart: on-failure:3
ports:
- 80:80
volumes:
- /home/dido/github/DockerFinder/discovery/webapp:/code
deploy:
placement:
constraints:
- node.hostname == swarm-manager
# #####################################################
# ############### STORAGE PHASE ####################
# #####################################################
images_server:
build: storage/images_server
image: diunipisocc/docker-finder:images_server
hostname: images_server
restart: on-failure:3
ports:
- "3000:3000"
depends_on:
- images_db
volumes:
- ./analysis/pyFinder/:/code
deploy:
placement:
constraints:
- node.hostname == swarm-manager
images_db:
image: mongo:3
restart: on-failure:3
hostname: images_db
volumes:
- /data/db
deploy:
placement:
constraints:
- node.hostname == swarm-manager
# /data/db is the deafult directory where mogno container store the databases.
#####################################################
############### MANAGEMENT PHASE ####################
#####################################################
##
# monitor:
# #container_name: monitor
# build: management
# ports:
# - "3002:3002"
# volumes:
# df-software:
# external: true