add librechat-oci
This commit is contained in:
parent
cc27c3bde4
commit
aa51907812
3 changed files with 49 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ rec {
|
|||
subdomain = "f";
|
||||
fqdn = subdomain + "." + domain;
|
||||
};
|
||||
librechat-oci = {
|
||||
fqdn = "lc." + domain;
|
||||
port = 3080;
|
||||
};
|
||||
mailserver = rec {
|
||||
subdomain = "mail";
|
||||
fqdn = subdomain + "." + domain;
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
./forgejo.nix
|
||||
./jirafeau.nix
|
||||
./librechat-oci.nix
|
||||
./miniflux.nix
|
||||
./netdata.nix
|
||||
./nginx.nix
|
||||
|
|
|
|||
44
hosts/rx4/services/librechat-oci.nix
Normal file
44
hosts/rx4/services/librechat-oci.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
inputs,
|
||||
constants,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (constants) domain;
|
||||
inherit (constants.hosts.rx4) ip;
|
||||
inherit (constants.services.librechat-oci) fqdn port;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.synix.nixosModules.librechat-oci
|
||||
];
|
||||
|
||||
services.librechat-oci = {
|
||||
enable = true;
|
||||
inherit port;
|
||||
externalUrl = "https://${fqdn}";
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${fqdn}" = {
|
||||
useACMEHost = fqdn;
|
||||
forceSSL = true;
|
||||
listen = [
|
||||
{
|
||||
addr = "${ip}:443";
|
||||
ssl = true;
|
||||
}
|
||||
];
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.certs."${fqdn}" = {
|
||||
domain = fqdn;
|
||||
postRun = "systemctl restart podman-librechat.service";
|
||||
group = "nginx";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue