begin work on authentik again
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{ config, lib, pkgs, ... }: let
|
||||
|
||||
hostPort = 11434;
|
||||
|
||||
subdomain = "ollama";
|
||||
|
||||
name = "ollama";
|
||||
|
||||
in {
|
||||
|
||||
options.sysconfig.docker.ollama.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
@@ -13,11 +21,11 @@
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ 11434 ];
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
|
||||
"ve-openwebui" = {
|
||||
allowedTCPPorts = [ 11434 ];
|
||||
allowedTCPPorts = [ hostPort ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,14 +35,14 @@
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "ollama.esotericbytes.com";
|
||||
hostname = "${subdomain}.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"11434:11434"
|
||||
"${builtins.toString hostPort}:11434"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
@@ -42,12 +50,12 @@
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.http.routers.ollama.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.ollama.rule" = "Host(`ollama.esotericbytes.com`)";
|
||||
"traefik.http.routers.ollama.service" = "ollama";
|
||||
"traefik.http.routers.ollama.tls.certResolver" = "cloudflare";
|
||||
"traefik.http.routers.${name}.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.${name}.rule" = "Host(`${subdomain}.esotericbytes.com`)";
|
||||
"traefik.http.routers.${name}.service" = "${name}";
|
||||
"traefik.http.routers.${name}.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.ollama.loadbalancer.server.url" = "http://192.168.100.10:11434";
|
||||
"traefik.http.services.ollama.loadbalancer.server.url" = "http://192.168.100.10:${builtins.toString hostPort}";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
|
||||
Reference in New Issue
Block a user