mirror of
https://github.com/modrinth/code.git
synced 2026-08-24 16:44:51 +00:00
feat: ElasticSearch backend (#6903)
* (do not merge) search test branch * perf * fix up search pagination * more parity and perf work * expand what parity does * fix author query * approach parity even without explicit parity enabled * remove old parity code * fix shear * fix * fmt
This commit is contained in:
+99
-1
@@ -32,6 +32,102 @@ services:
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
elasticsearch0:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:9.4.4
|
||||
container_name: labrinth-elasticsearch0
|
||||
restart: on-failure
|
||||
networks:
|
||||
- elasticsearch-mesh
|
||||
ports:
|
||||
- '127.0.0.1:9200:9200'
|
||||
volumes:
|
||||
- elasticsearch0-data:/usr/share/elasticsearch/data
|
||||
environment:
|
||||
node.name: elasticsearch0
|
||||
cluster.name: labrinth-elasticsearch
|
||||
discovery.seed_hosts: elasticsearch0,elasticsearch1,elasticsearch2
|
||||
cluster.initial_master_nodes: elasticsearch0,elasticsearch1,elasticsearch2
|
||||
bootstrap.memory_lock: 'true'
|
||||
xpack.security.enabled: 'false'
|
||||
xpack.security.enrollment.enabled: 'false'
|
||||
ES_JAVA_OPTS: -Xms512m -Xmx512m
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
'CMD-SHELL',
|
||||
'curl --fail http://localhost:9200/_cluster/health?wait_for_status=yellow',
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
elasticsearch1:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:9.4.4
|
||||
container_name: labrinth-elasticsearch1
|
||||
restart: on-failure
|
||||
networks:
|
||||
- elasticsearch-mesh
|
||||
ports:
|
||||
- '127.0.0.1:9201:9200'
|
||||
volumes:
|
||||
- elasticsearch1-data:/usr/share/elasticsearch/data
|
||||
environment:
|
||||
node.name: elasticsearch1
|
||||
cluster.name: labrinth-elasticsearch
|
||||
discovery.seed_hosts: elasticsearch0,elasticsearch1,elasticsearch2
|
||||
cluster.initial_master_nodes: elasticsearch0,elasticsearch1,elasticsearch2
|
||||
bootstrap.memory_lock: 'true'
|
||||
xpack.security.enabled: 'false'
|
||||
xpack.security.enrollment.enabled: 'false'
|
||||
ES_JAVA_OPTS: -Xms512m -Xmx512m
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
'CMD-SHELL',
|
||||
'curl --fail http://localhost:9200/_cluster/health?wait_for_status=yellow',
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
elasticsearch2:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:9.4.4
|
||||
container_name: labrinth-elasticsearch2
|
||||
restart: on-failure
|
||||
networks:
|
||||
- elasticsearch-mesh
|
||||
ports:
|
||||
- '127.0.0.1:9202:9200'
|
||||
volumes:
|
||||
- elasticsearch2-data:/usr/share/elasticsearch/data
|
||||
environment:
|
||||
node.name: elasticsearch2
|
||||
cluster.name: labrinth-elasticsearch
|
||||
discovery.seed_hosts: elasticsearch0,elasticsearch1,elasticsearch2
|
||||
cluster.initial_master_nodes: elasticsearch0,elasticsearch1,elasticsearch2
|
||||
bootstrap.memory_lock: 'true'
|
||||
xpack.security.enabled: 'false'
|
||||
xpack.security.enrollment.enabled: 'false'
|
||||
ES_JAVA_OPTS: -Xms512m -Xmx512m
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
'CMD-SHELL',
|
||||
'curl --fail http://localhost:9200/_cluster/health?wait_for_status=yellow',
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
meilisearch0:
|
||||
image: getmeili/meilisearch:v1.12.0
|
||||
container_name: labrinth-meilisearch0
|
||||
@@ -398,7 +494,7 @@ services:
|
||||
depends_on:
|
||||
postgres_db:
|
||||
condition: service_healthy
|
||||
meilisearch:
|
||||
meilisearch0:
|
||||
condition: service_healthy
|
||||
elasticsearch0:
|
||||
condition: service_healthy
|
||||
@@ -481,6 +577,8 @@ services:
|
||||
volumes:
|
||||
- ./apps/labrinth/nginx/meili-lb.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
networks:
|
||||
elasticsearch-mesh:
|
||||
driver: bridge
|
||||
meilisearch-mesh:
|
||||
driver: bridge
|
||||
redis-cluster-mesh:
|
||||
|
||||
Reference in New Issue
Block a user