forked from GSA/search-services
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
239 lines (226 loc) · 4.9 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
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
version: '3'
services:
elasticsearch7:
build:
context: ./
dockerfile: Dockerfile.elasticsearch7
environment:
- bootstrap.memory_lock=true
- cluster.name=es7-docker-cluster
- discovery.type=single-node
- xpack.license.self_generated.type=trial
- xpack.monitoring.enabled=false
- xpack.security.enabled=false
- 'ES_JAVA_OPTS=-Xms256m -Xmx256m'
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_7_data:/usr/share/elasticsearch/data
ports:
- 9200:9200
expose:
- 9200
healthcheck:
test: curl -u elastic:elastic -s -f elasticsearch7:9200/_cat/health >/dev/null || exit 1
interval: 10s
timeout: 10s
retries: 5
networks:
- app-network
kibana7:
image: docker.elastic.co/kibana/kibana:7.17.7
depends_on:
- elasticsearch7
ports:
- 5601:5601
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch7:9200
networks:
- app-network
mysql:
platform: linux/amd64
image: mysql:8.0
volumes:
- db_data:/var/lib/mysql
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ''
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
networks:
- app-network
redis:
image: redis:6.2
ports:
- 6379:6379
networks:
- app-network
command: redis-server --bind "0.0.0.0"
# Required by search-gov
tika:
platform: linux/amd64
image: apache/tika:2.4.1
ports:
- 9998:9998
networks:
- app-network
search-gov:
platform: linux/amd64
build:
context: ../search-gov/
dockerfile: Dockerfile
depends_on:
elasticsearch7:
condition: service_healthy
mysql:
condition: service_started
redis:
condition: service_started
kibana7:
condition: service_started
tika:
condition: service_started
environment:
PIDFILE: /tmp/pids/server.pid
command: bundle exec rails server --binding 0.0.0.0 -p 3100
expose:
- 3100
ports:
- 3100:3100
volumes:
- ../search-gov/:/usr/src/app
- gem_cache_search-gov:/gems
tmpfs:
- /tmp/pids/
env_file:
- ../search-gov/.env.development
- ../search-gov/.env.test
links:
- i14y
- asis
networks:
- app-network
profiles:
- search-gov
resque-workers:
command: bundle exec rake environment resque:work
build:
context: ../search-gov/
depends_on:
- elasticsearch7
- mysql
- redis
- search-gov
env_file:
- ../search-gov/.env.development
- ../search-gov/.env.test
networks:
- app-network
profiles:
- search-gov
resque-scheduler:
command: bundle exec rake resque:scheduler
build:
context: ../search-gov/
depends_on:
- elasticsearch7
- mysql
- redis
- search-gov
env_file:
- ../search-gov/.env.development
- ../search-gov/.env.test
networks:
- app-network
profiles:
- search-gov
i14y:
build:
context: ../i14y/
dockerfile: Dockerfile
depends_on:
- elasticsearch7
- kibana7
- mysql
- redis
command: bundle exec rails server --binding 0.0.0.0 -p 3200
environment:
- ES_HOSTS=elasticsearch7:9200
- PIDFILE=/tmp/pids/server.pid
- DOCKER=true
expose:
- 3200
tmpfs:
- /tmp/pids/
ports:
- 3200:3200
volumes:
- ../i14y/:/usr/src/app
- ../i14y/config/secrets.yml:/usr/src/app/config/secrets.yml
- gem_cache_i14y:/gems
links:
- elasticsearch7
networks:
- app-network
profiles:
- i14y
asis:
build:
context: ../asis/
dockerfile: Dockerfile
depends_on:
elasticsearch7:
condition: service_healthy
command: bundle exec rails server --binding 0.0.0.0 -p 3300
expose:
- 3300
ports:
- 3300:3300
tmpfs:
- /tmp/pids/
environment:
- PIDFILE=/tmp/pids/server.pid
- DOCKER=true
volumes:
- ../asis/:/usr/src/app
- ../asis/config/flickr.yml:/usr/src/app/config/flickr.yml
- gem_cache_asis:/gems
env_file:
- ../asis/.env/development/app
links:
- elasticsearch7
networks:
- app-network
profiles:
- asis
sidekiq:
build:
context: ../asis/
command: bundle exec sidekiq
depends_on:
elasticsearch7:
condition: service_healthy
redis:
condition: service_started
volumes:
- ../asis/:/usr/src/app
- ../asis/config/flickr.yml:/usr/src/app/config/flickr.yml
env_file:
- ../asis/.env/development/app
links:
- elasticsearch7
networks:
- app-network
profiles:
- asis
volumes:
db_data:
es_7_data:
gem_cache_i14y:
gem_cache_asis:
gem_cache_search-gov:
networks:
app-network:
driver: bridge