feat(llm): add docling-serve service and reverse proxy configuration
This commit is contained in:
parent
b3368553a2
commit
4058d5aa2f
@ -61,6 +61,11 @@ in
|
|||||||
environmentVariables = cfg.environmentVariables;
|
environmentVariables = cfg.environmentVariables;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.docling-serve = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.unstablePkgs.docling-serve;
|
||||||
|
};
|
||||||
|
|
||||||
pepe.core.vhost.hosts = optionalAttrs (cfg.backendDomain != null) {
|
pepe.core.vhost.hosts = optionalAttrs (cfg.backendDomain != null) {
|
||||||
"${cfg.backendDomain}" = {
|
"${cfg.backendDomain}" = {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
@ -76,6 +81,21 @@ in
|
|||||||
proxy_set_header Host localhost:${toString config.services.ollama.port};
|
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;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user