add traefik dashboard
This commit is contained in:
@@ -41,7 +41,7 @@ in
|
||||
|
||||
networking.defaultGateway = net.gateway;
|
||||
networking.nameservers = net.dns;
|
||||
networking.firewall.allowedTCPPorts = [ 8080 80 443 880 4443 ];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 880 4443 ];
|
||||
|
||||
systemd.services.traefik.serviceConfig.EnvironmentFile = [
|
||||
"/run/secrets/traefik-cf-tk"
|
||||
@@ -55,7 +55,6 @@ in
|
||||
};
|
||||
api = {
|
||||
dashboard = true;
|
||||
insecure = true;
|
||||
};
|
||||
entryPoints = {
|
||||
local = {
|
||||
@@ -75,6 +74,7 @@ in
|
||||
cloudflare = {
|
||||
acme = {
|
||||
email = "smayzy@smayzy.ovh";
|
||||
storage = "/var/lib/traefik/acme.json";
|
||||
dnsChallenge = {
|
||||
provider = "cloudflare";
|
||||
resolvers = [ "192.168.1.202" ];
|
||||
@@ -86,6 +86,16 @@ in
|
||||
|
||||
};
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
routers = {
|
||||
traefik = {
|
||||
rule = "Host(`traefik.internal.smayzy.ovh`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))";
|
||||
entryPoints = [ "localSec" ];
|
||||
service = "api@internal";
|
||||
tls.certResolver = "cloudflare";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user