refactor traefik + add open-webui service
This commit is contained in:
parent
2f545a818f
commit
969075a5de
4 changed files with 30 additions and 11 deletions
|
@ -30,6 +30,8 @@
|
|||
# Enable the Open-WebUI server
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
host = "fuchsia.home.arpa";
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# Mount our subvolume for storage of models
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
imports = [
|
||||
"${inputs.nixpkgs-unstable}/nixos/modules/services/web-servers/traefik.nix"
|
||||
./middlewares.nix
|
||||
./routers.nix
|
||||
./services.nix
|
||||
];
|
||||
|
||||
age.secrets.traefik = {
|
||||
|
@ -154,17 +156,6 @@
|
|||
insecureSkipVerify = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Setup our dashboard
|
||||
dynamicConfigOptions.http.routers = {
|
||||
traefik-dashboard = {
|
||||
rule = "Host(`traefik.home.arpa`)";
|
||||
entryPoints = [
|
||||
"websecure"
|
||||
];
|
||||
service = "api@internal";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Persist our traefik data & logs
|
||||
|
|
19
nixos/viridian/services/traefik/routers.nix
Normal file
19
nixos/viridian/services/traefik/routers.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{...}: {
|
||||
services.traefik.dynamicConfigOptions.http.routers = {
|
||||
traefik-dashboard = {
|
||||
rule = "Host(`traefik.home.arpa`)";
|
||||
entryPoints = [
|
||||
"websecure"
|
||||
];
|
||||
service = "api@internal";
|
||||
};
|
||||
|
||||
open-webui = {
|
||||
rule = "Host(`ollama.home.arpa`)";
|
||||
entryPoints = [
|
||||
"websecure"
|
||||
];
|
||||
service = "open-webui";
|
||||
};
|
||||
};
|
||||
}
|
7
nixos/viridian/services/traefik/services.nix
Normal file
7
nixos/viridian/services/traefik/services.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
services.traefik.dynamicConfigOptions.http.services = {
|
||||
open-webui.loadBalancer.servers = [
|
||||
{url = "http://fuchsia.home.arpa:8080";}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue