File tree Expand file tree Collapse file tree 6 files changed +60
-0
lines changed
Expand file tree Collapse file tree 6 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ APP_DEFAULT_LOCALE='en'
99APP_AVAILABLE_LOCALES = ' es,en,fr'
1010APP_FALLBACK_LOCALES = ' es,en,fr'
1111
12+ ES_PORT = ' 9201'
13+ ES_HOST = ' http://elasticsearch'
14+ # ELASTICSEARCH_URL='http://elasticsearch:9201'
15+
1216BASE_URL = ' http://localhost:3000'
1317
1418REDIS_URL = ' redis://community-engine-redis:6379'
Original file line number Diff line number Diff line change 2828 devise
2929 devise-i18n
3030 devise-jwt
31+ elasticsearch-model (~> 7 )
32+ elasticsearch-rails (~> 7 )
3133 font-awesome-sass (~> 6.5 )
3234 friendly_id (>= 5.2 , < 5.6 )
3335 friendly_id-mobility (~> 1.0.4 )
255257 dry-core (1.0.1 )
256258 concurrent-ruby (~> 1.0 )
257259 zeitwerk (~> 2.6 )
260+ elasticsearch (7.17.11 )
261+ elasticsearch-api (= 7.17.11 )
262+ elasticsearch-transport (= 7.17.11 )
263+ elasticsearch-api (7.17.11 )
264+ multi_json
265+ elasticsearch-model (7.2.1 )
266+ activesupport (> 3 )
267+ elasticsearch (~> 7 )
268+ hashie
269+ elasticsearch-rails (7.2.1 )
270+ elasticsearch-transport (7.17.11 )
271+ base64
272+ faraday (>= 1 , < 3 )
273+ multi_json
258274 erubi (1.13.0 )
259275 excon (0.111.0 )
260276 execjs (2.9.1 )
265281 railties (>= 5.0.0 )
266282 faker (3.4.2 )
267283 i18n (>= 1.8.11 , < 2 )
284+ faraday (2.11.0 )
285+ faraday-net_http (>= 2.0 , < 3.4 )
286+ logger
287+ faraday-net_http (3.3.0 )
288+ net-http
268289 ffi (1.17.0-x86_64-linux-gnu )
269290 fog-aws (3.26.0 )
270291 base64 (~> 0.2.0 )
298319 google-protobuf (4.28.0-x86_64-linux )
299320 bigdecimal
300321 rake (>= 13 )
322+ hashie (5.0.0 )
301323 highline (3.1.0 )
302324 reline
303325 htmlentities (4.3.4 )
371393 msgpack (1.7.2 )
372394 multi_json (1.15.0 )
373395 mutex_m (0.2.0 )
396+ net-http (0.4.1 )
397+ uri
374398 net-imap (0.4.12 )
375399 date
376400 net-protocol
632656 execjs (>= 0.3.0 , < 3 )
633657 unf (0.2.0 )
634658 unicode-display_width (2.5.0 )
659+ uri (0.13.1 )
635660 virtus (2.0.0 )
636661 axiom-types (~> 0.1 )
637662 coercible (~> 1.0 )
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ Gem::Specification.new do |spec|
3636 spec . add_dependency 'devise'
3737 spec . add_dependency 'devise-i18n'
3838 spec . add_dependency 'devise-jwt'
39+ spec . add_dependency 'elasticsearch-model' , '~> 7'
40+ spec . add_dependency 'elasticsearch-rails' , '~> 7'
3941 spec . add_dependency 'font-awesome-sass' , '~> 6.5'
4042 spec . add_dependency 'friendly_id' , '>= 5.2' , '< 5.6'
4143 spec . add_dependency 'friendly_id-mobility' , '~> 1.0.4'
Original file line number Diff line number Diff line change 1+ # config/initializers/elasticsearch.rb
2+ Elasticsearch ::Model . client = Elasticsearch ::Client . new (
3+ port : ENV . fetch ( 'ES_PORT' ) { 9200 } ,
4+ host : ENV . fetch ( 'ES_HOST' ) { 'http://es' } ,
5+ url : ENV . fetch ( 'ELASTICSEARCH_URL' ) { 'http://elasticsearch:9201' }
6+ )
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ version: '3.6'
33volumes :
44 community-engine-bundler-gems :
55 community-engine-db-data :
6+ community-engine-elasticsearch :
67 community-engine-redis :
78
89x-env-info : &env-info
@@ -40,6 +41,26 @@ services:
4041 - " 5440:5432"
4142 env_file :
4243 - ' ./.env.db.dev'
44+
45+ elasticsearch :
46+ container_name : community-engine-elasticsearch
47+ image : elasticsearch:7.17.23
48+ environment :
49+ - node.name=elasticsearch
50+ - cluster.name=community-engine-es
51+ - discovery.seed_hosts=elasticsearch
52+ - discovery.type=single-node
53+ - bootstrap.memory_lock=true
54+ - " ES_JAVA_OPTS=-Xms512m -Xmx512m"
55+ ports :
56+ - 9201:9200
57+ ulimits :
58+ memlock :
59+ soft : -1
60+ hard : -1
61+ volumes :
62+ - community-engine-elasticsearch:/usr/share/elasticsearch/data
63+
4364
4465 sidekiq :
4566 << : *app-shared
Original file line number Diff line number Diff line change 1212require 'devise'
1313require 'devise-i18n'
1414require 'devise/jwt'
15+ require 'elasticsearch/model'
16+ require 'elasticsearch/rails'
1517require 'font-awesome-sass'
1618require 'i18n-timezones'
1719require 'importmap-rails'
You can’t perform that action at this time.
0 commit comments