From bb4d7e95a81fea1f95081e9930c03023b550f8be Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 9 Sep 2025 21:34:09 +0000 Subject: [PATCH] Update librechat rag to use locally-built and local DB I have to do the local build because I no longer have access to the one at docker.io. --- modules/system/librechat.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/system/librechat.nix b/modules/system/librechat.nix index 0019f59..c3d1fac 100644 --- a/modules/system/librechat.nix +++ b/modules/system/librechat.nix @@ -23,6 +23,14 @@ in services.mongodb = { enable = true; }; + services.postgresql = { + ensureDatabases = [ "rag_api" ]; + ensureUsers = [{ + ensureClauses.login = true; + ensureDBOwnership = true; + name = "rag_api"; + }]; + }; sops.secrets.librechat-env = { format = "dotenv"; group = "librechat"; @@ -114,7 +122,7 @@ in environmentFiles = [ "/var/run/secrets/rag-api-env" ]; - image = "docker.io/library/rag_api:latest"; + image = "localhost/rag_api:latest"; ports = [ "127.0.0.1:10051:8000" ]; volumes = [ "/opt/rag-api:/app/uploads"