try docker provider for traefik
This commit is contained in:
0
system/services/docker/authentik/default.nix
Normal file
0
system/services/docker/authentik/default.nix
Normal file
@@ -41,6 +41,15 @@
|
||||
"vol_ollama:/root/.ollama"
|
||||
];
|
||||
|
||||
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.services.ollama.loadbalancer.server.port" = "11434";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
"--device=nvidia.com/gpu=all"
|
||||
"--ip=192.168.101.4"
|
||||
|
||||
@@ -38,6 +38,15 @@
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.http.routers.pihole.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.pihole.rule" = "Host(`pihole.esotericbytes.com`)";
|
||||
"traefik.http.routers.pihole.service" = "pihole";
|
||||
"traefik.http.routers.pihole.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.pihole.loadbalancer.server.port" = "80";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
"--ip=192.168.101.3"
|
||||
];
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.http.routers.portainer.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.portainer.rule" = "Host(`portainer.esotericbytes.com`)";
|
||||
"traefik.http.routers.portainer.service" = "portainer";
|
||||
"traefik.http.routers.portainer.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.portainer.loadbalancer.server.port" = "9000";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
"--ip=192.168.101.2"
|
||||
];
|
||||
|
||||
55
system/services/docker/searxng/default.nix
Normal file
55
system/services/docker/searxng/default.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options.sysconfig.docker.searxng.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.sysconfig.docker.searxng.enable && config.sysconfig.docker.enable) {
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
"ve-traefik" = {
|
||||
allowedTCPPorts = [ 9002 ];
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.searxng = {
|
||||
image = "searxng/searxng:latest";
|
||||
|
||||
# unstable, waiting for 26.05
|
||||
#pull = "newer";
|
||||
|
||||
hostname = "searxng.esotericbytes.com";
|
||||
|
||||
networks = [
|
||||
"docker-main"
|
||||
];
|
||||
|
||||
labels = {
|
||||
"traefik.http.routers.searxng.entrypoints" = "localsecure";
|
||||
"traefik.http.routers.searxng.rule" = "Host(`searxng.esotericbytes.com`)";
|
||||
"traefik.http.routers.searxng.service" = "searxng";
|
||||
"traefik.http.routers.searxng.tls.certResolver" = "cloudflare";
|
||||
|
||||
"traefik.http.services.searxng.loadbalancer.server.port" = "8080";
|
||||
};
|
||||
|
||||
extraOptions = lib.mkIf config.sysconfig.docker.nvidia [
|
||||
"--ip=192.168.101.5"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"9002:8080"
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"vol_searxng_settings:/etc/searxng/"
|
||||
"vol_searxng_data:/var/cache/searxng/"
|
||||
];
|
||||
|
||||
environment = {
|
||||
SEARXNG_SECRET = "2e8b4fcf4c0f46b097496f2d5715dbb061bd5cac78c64d0f5a0bee27f013f3c0";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user