Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ tracing-ecs = "0.5.0"
tracing-error = "0.2.1"
tracing-subscriber = "0.3.20"
typed-path = "0.12.0"
unicode-normalization = "0.1.24"
url = "2.5.7"
urlencoding = "2.1.3"
utoipa = { version = "5.4.0", features = ["actix_extras", "chrono", "decimal"] }
Expand Down
9 changes: 5 additions & 4 deletions apps/labrinth/.env.docker-compose
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ DATABASE_URL=postgresql://labrinth:labrinth@labrinth-postgres/labrinth
DATABASE_MIN_CONNECTIONS=0
DATABASE_MAX_CONNECTIONS=16

SEARCH_BACKEND=typesense
SEARCH_BACKEND=elasticsearch
MEILISEARCH_READ_ADDR=http://localhost:7700
MEILISEARCH_WRITE_ADDRS=http://localhost:7700
MEILISEARCH_KEY=modrinth
ELASTICSEARCH_URL=http://localhost:9200
ELASTICSEARCH_URL=http://elasticsearch0:9200
ELASTICSEARCH_INDEX_PREFIX=labrinth
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=elastic
ELASTICSEARCH_USERNAME=
ELASTICSEARCH_PASSWORD=
ELASTICSEARCH_TYPESENSE_PARITY=true
SEARCH_INDEX_CHUNK_SIZE=5000
SEARCH_INCREMENTAL_INDEX_BATCH_DELAY_SECONDS=5
SEARCH_INCREMENTAL_INDEX_BATCH_MAX_SIZE=1000
Expand Down
5 changes: 3 additions & 2 deletions apps/labrinth/.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DATABASE_URL=postgresql://labrinth:labrinth@localhost/labrinth
DATABASE_MIN_CONNECTIONS=0
DATABASE_MAX_CONNECTIONS=16

SEARCH_BACKEND=typesense
SEARCH_BACKEND=elasticsearch

# Meilisearch configuration
MEILISEARCH_READ_ADDR=http://localhost:7700
Expand All @@ -32,7 +32,7 @@ ELASTICSEARCH_INDEX_PREFIX=labrinth
# MEILISEARCH_READ_ADDR=http://localhost:7710
# MEILISEARCH_WRITE_ADDRS=http://localhost:7700,http://localhost:7701

SEARCH_BACKEND=typesense
SEARCH_BACKEND=elasticsearch

MEILISEARCH_KEY=modrinth
MEILISEARCH_META_NAMESPACE=
Expand All @@ -42,6 +42,7 @@ ELASTICSEARCH_URL=http://localhost:9200
ELASTICSEARCH_INDEX_PREFIX=labrinth
ELASTICSEARCH_USERNAME=
ELASTICSEARCH_PASSWORD=
ELASTICSEARCH_TYPESENSE_PARITY=true

SEARCH_INDEX_CHUNK_SIZE=5000
SEARCH_INCREMENTAL_INDEX_BATCH_DELAY_SECONDS=5
Expand Down
1 change: 1 addition & 0 deletions apps/labrinth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ tokio-stream = { workspace = true }
totp-rs = { workspace = true, features = ["gen_secret"] }
tracing = { workspace = true }
tracing-actix-web = { workspace = true }
unicode-normalization = { workspace = true }
url = { workspace = true }
urlencoding = { workspace = true }
utoipa = { workspace = true, features = ["url"] }
Expand Down
6 changes: 6 additions & 0 deletions apps/labrinth/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@
SEARCH_TYPESENSE_DEFAULT_BUCKETING: Json<crate::search::backend::typesense::Bucketing> =
Json(crate::search::backend::typesense::Bucketing::Buckets(5));
SEARCH_TYPESENSE_DEFAULT_MAX_CANDIDATES: usize = 24usize;
ELASTICSEARCH_URL: String = "http://localhost:9200";
ELASTICSEARCH_INDEX_PREFIX: String = "labrinth";
ELASTICSEARCH_USERNAME: String = "";

Check warning on line 242 in apps/labrinth/src/env.rs

View workflow job for this annotation

GitHub Actions / Lint and Test

Diff in /home/runner/work/code/code/apps/labrinth/src/env.rs
ELASTICSEARCH_PASSWORD: String = "";
ELASTICSEARCH_BULK_BATCH_SIZE: usize = 1000usize;
ELASTICSEARCH_TYPESENSE_PARITY: bool = true;

// storage
STORAGE_BACKEND: crate::file_hosting::FileHostKind = crate::file_hosting::FileHostKind::Local;
Expand Down
Loading
Loading