feat(llm): add docling-serve service and reverse proxy configuration

This commit is contained in:
Giulio De Pasquale 2025-08-13 10:33:36 +01:00
parent b3368553a2
commit 4058d5aa2f

View File

@ -61,6 +61,11 @@ in
environmentVariables = cfg.environmentVariables;
};
services.docling-serve = {
enable = true;
package = pkgs.unstablePkgs.docling-serve;
};
pepe.core.vhost.hosts = optionalAttrs (cfg.backendDomain != null) {
"${cfg.backendDomain}" = {
locations."/" = {
@ -76,6 +81,21 @@ in
proxy_set_header Host localhost:${toString config.services.ollama.port};
'';
};
locations."/docling/" = {
host = config.services.docling-serve.host;
port = config.services.docling-serve.port;
allowLAN = true;
allowVPN = true;
allowWAN = true;
recommendedProxySettings = false;
extraConfig = ''
proxy_buffering off;
proxy_read_timeout 600s;
rewrite ^/docling/(.*) /$1 break;
'';
};
};
};
})