-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
238 lines (222 loc) · 5.29 KB
/
docker-compose.yml
File metadata and controls
238 lines (222 loc) · 5.29 KB
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
x-search-gov-base: &search-gov-base
platform: linux/amd64
build:
context: ../search-gov/
dockerfile: Dockerfile.dev
depends_on:
elasticsearch7:
condition: service_healthy
mysql:
condition: service_started
redis:
condition: service_healthy
kibana7:
condition: service_started
opensearch:
condition: service_started
volumes:
- ../search-gov/:/usr/src/app
- gem_cache_search-gov:/gems
environment:
DB_HOST: mysql
ES_HOSTS: http://elasticsearch7:9200
OPENSEARCH_SEARCH_HOST: http://opensearch:9200
REDIS_SESSION_HOST: redis
REDIS_SYSTEM_URL: redis://redis:6379
env_file:
- ../search-gov/.env.development
profiles:
- search-gov
networks:
- app-network
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.40
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"
healthcheck:
test: redis-cli ping >/dev/null || exit 1
interval: 1s
timeout: 3s
retries: 5
opensearch:
build:
context: .
dockerfile: Dockerfile.opensearch
environment:
- bootstrap.memory_lock=true
- cluster.name=opensearch-cluster
- discovery.type=single-node
- plugins.security.disabled=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=S3venDr4gon!"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- opensearch_data:/usr/share/opensearch/data
ports:
- 9300:9200
- 9600:9600
expose:
- 9300
healthcheck:
test: curl -s -f http://localhost:9200/_cat/health >/dev/null || exit 1
interval: 10s
timeout: 10s
retries: 5
networks:
- app-network
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:3
ports:
- 5701:5601
environment:
OPENSEARCH_HOSTS: '["http://opensearch:9200"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true
networks:
- app-network
depends_on:
opensearch:
condition: service_healthy
healthcheck:
test: curl -s -f http://localhost:5601/api/status >/dev/null || exit 1
interval: 10s
timeout: 10s
retries: 10
search-gov:
<<: *search-gov-base
command: bin/rails server --binding 0.0.0.0 -p 3000
expose:
- 3000
ports:
- 3000:3000
resque-workers:
<<: *search-gov-base
command: bin/bundle exec rake environment resque:work
resque-scheduler:
<<: *search-gov-base
command: bin/bundle exec rake resque:scheduler
i14y:
build:
context: ../i14y/
dockerfile: Dockerfile.dev
depends_on:
- elasticsearch7
- kibana7
- mysql
- redis
command: bin/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:
- search-gov
spider: &spider
build:
context: ../searchgov-spider
dockerfile: DockerFile.dev
env_file:
- ../searchgov-spider/.env.development
environment:
PYTHONPATH: /usr/src/searchgov-spider
depends_on:
redis:
condition: service_healthy
opensearch:
condition: service_healthy
network_mode: host
profiles:
- search-gov
spider-scheduler:
<<: *spider
command: python search_gov_crawler/scrapy_scheduler.py
spider-sitemap:
<<: *spider
working_dir: /usr/src/searchgov-spider/search_gov_crawler
command: python run_sitemap_monitor.py
spider-freshness-checker:
<<: *spider
command: python search_gov_crawler/check_freshness.py
volumes:
db_data:
es_7_data:
opensearch_data:
gem_cache_i14y:
gem_cache_search-gov:
networks:
app-network:
driver: bridge