Use opensearch for code and issue search

This commit is contained in:
June 2024-01-22 17:59:01 +01:00
parent 12c38aac8b
commit 485ed0fec2
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
3 changed files with 20 additions and 0 deletions

View file

@ -6,6 +6,7 @@
./forgejo.nix
./networking.nix
./nginx.nix
./opensearch.nix
./redis.nix
];
}

View file

@ -66,6 +66,13 @@
ADAPTER = "redis";
HOST = "redis+socket:///run/redis-forgejo/redis.sock";
};
indexer = {
ISSUE_INDEXER_TYPE = "elasticsearch";
ISSUE_INDEXER_CONN_STR = "http://127.0.0.1:9200";
REPO_INDEXER_ENABLED = true;
REPO_INDEXER_TYPE = "elasticsearch";
REPO_INDEXER_CONN_STR = "http://127.0.0.1:9200";
};
};
};

View file

@ -0,0 +1,12 @@
{ ... }:
{
services.opensearch = {
enable = true;
};
systemd.services.forgejo = {
after = [ "opensearch.service" ];
requires = [ "opensearch.service" ];
};
}