This PR contains the following updates: | Package | Update | Change | |---|---|---| | [traefik](https://github.com/containous/traefik) | patch | `v3.7.6` → `v3.7.7` | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/12) for more information. --- ### Release Notes <details> <summary>containous/traefik (traefik)</summary> ### [`v3.7.7`](https://github.com/traefik/traefik/releases/tag/v3.7.7) [Compare Source](https://github.com/containous/traefik/compare/v3.7.7...v3.7.7) **Important:** Please read the [migration guide](https://doc.traefik.io/traefik/v3.7/migrate/v3/#v377). **Bug fixes:** - **\[middleware, k8s/ingress-nginx]** Add app-root middleware with nginx variable interpolation ([#​13398](https://github.com/traefik/traefik/pull/13398) [@​dfeinblatt](https://github.com/dfeinblatt)) - **\[rules]** Fix consistency between HostSNI(*) and Host(*) ([#​13460](https://github.com/traefik/traefik/pull/13460) [@​juliens](https://github.com/juliens)) - **\[k8s, k8s/gatewayapi]** Fix ExtensionRef filters on backendRefs to resolve against the HTTPRoute namespace ([#​13462](https://github.com/traefik/traefik/pull/13462) [@​gndz07](https://github.com/gndz07)) - **\[middleware]** Fix handle empty unknown-length bodies in mirroring ([#​13399](https://github.com/traefik/traefik/pull/13399) [@​amazon7737](https://github.com/amazon7737)) - **\[k8s/crd]** Fix cross-provider ref check for TCP ServersTransport in Kubernetes CRD provider ([#​13458](https://github.com/traefik/traefik/pull/13458) [@​gndz07](https://github.com/gndz07)) - **\[middleware]** Sanitize replaced path in ReplacePathRegex middleware ([#​13466](https://github.com/traefik/traefik/pull/13466) [@​kevinpollet](https://github.com/kevinpollet)) - **\[acme]** Bump software.sslmate.com/src/go-pkcs12 to v0.7.3 ([#​13477](https://github.com/traefik/traefik/pull/13477) [@​rtribotte](https://github.com/rtribotte)) - **\[otel]** Bump go.opentelemetry.io/otel to v1.44.0 ([#​13478](https://github.com/traefik/traefik/pull/13478) [@​rtribotte](https://github.com/rtribotte)) - **\[k8s]** Fix panic when endpointslice port value or name is nil ([#​13481](https://github.com/traefik/traefik/pull/13481) [@​kevinpollet](https://github.com/kevinpollet)) **Documentation:** - Fix version in migration guide ([#​13434](https://github.com/traefik/traefik/pull/13434) [@​kevinpollet](https://github.com/kevinpollet)) - Fix changelog v2.11.51 ([#​13430](https://github.com/traefik/traefik/pull/13430) [@​mmatur](https://github.com/mmatur)) - Add v3.7 to supported version docs ([#​13118](https://github.com/traefik/traefik/pull/13118) [@​jnoordsij](https://github.com/jnoordsij)) - Fix some function names in comments ([#​13443](https://github.com/traefik/traefik/pull/13443) [@​blackflytech](https://github.com/blackflytech)) - Add [@​nandorKollar](https://github.com/nandorKollar) as a current maintainer ([#​13451](https://github.com/traefik/traefik/pull/13451) [@​emilevauge](https://github.com/emilevauge)) - Add [@​amazon7737](https://github.com/amazon7737) as a current maintainer ([#​13450](https://github.com/traefik/traefik/pull/13450) [@​emilevauge](https://github.com/emilevauge)) - **\[middleware]** Clarify buffering middleware defaults ([#​13401](https://github.com/traefik/traefik/pull/13401) [@​amazon7737](https://github.com/amazon7737)) - Fix grammar in TLS, TCP service, and routing reference docs ([#​13461](https://github.com/traefik/traefik/pull/13461) [@​almightymoon](https://github.com/almightymoon)) - Fix X-Forwarded-Prefix documentation for dashboard redirection ([#​13472](https://github.com/traefik/traefik/pull/13472) [@​kevinpollet](https://github.com/kevinpollet)) ### [`v3.7.7`](https://github.com/traefik/traefik/releases/tag/v3.7.7) [Compare Source](https://github.com/containous/traefik/compare/v3.7.6...v3.7.7) **Important:** Please read the [migration guide](https://doc.traefik.io/traefik/v3.7/migrate/v3/#v377). **Bug fixes:** - **\[middleware, k8s/ingress-nginx]** Add app-root middleware with nginx variable interpolation ([#​13398](https://github.com/traefik/traefik/pull/13398) [@​dfeinblatt](https://github.com/dfeinblatt)) - **\[rules]** Fix consistency between HostSNI(*) and Host(*) ([#​13460](https://github.com/traefik/traefik/pull/13460) [@​juliens](https://github.com/juliens)) - **\[k8s, k8s/gatewayapi]** Fix ExtensionRef filters on backendRefs to resolve against the HTTPRoute namespace ([#​13462](https://github.com/traefik/traefik/pull/13462) [@​gndz07](https://github.com/gndz07)) - **\[middleware]** Fix handle empty unknown-length bodies in mirroring ([#​13399](https://github.com/traefik/traefik/pull/13399) [@​amazon7737](https://github.com/amazon7737)) - **\[k8s/crd]** Fix cross-provider ref check for TCP ServersTransport in Kubernetes CRD provider ([#​13458](https://github.com/traefik/traefik/pull/13458) [@​gndz07](https://github.com/gndz07)) - **\[middleware]** Sanitize replaced path in ReplacePathRegex middleware ([#​13466](https://github.com/traefik/traefik/pull/13466) [@​kevinpollet](https://github.com/kevinpollet)) - **\[acme]** Bump software.sslmate.com/src/go-pkcs12 to v0.7.3 ([#​13477](https://github.com/traefik/traefik/pull/13477) [@​rtribotte](https://github.com/rtribotte)) - **\[otel]** Bump go.opentelemetry.io/otel to v1.44.0 ([#​13478](https://github.com/traefik/traefik/pull/13478) [@​rtribotte](https://github.com/rtribotte)) - **\[k8s]** Fix panic when endpointslice port value or name is nil ([#​13481](https://github.com/traefik/traefik/pull/13481) [@​kevinpollet](https://github.com/kevinpollet)) **Documentation:** - Fix version in migration guide ([#​13434](https://github.com/traefik/traefik/pull/13434) [@​kevinpollet](https://github.com/kevinpollet)) - Fix changelog v2.11.51 ([#​13430](https://github.com/traefik/traefik/pull/13430) [@​mmatur](https://github.com/mmatur)) - Add v3.7 to supported version docs ([#​13118](https://github.com/traefik/traefik/pull/13118) [@​jnoordsij](https://github.com/jnoordsij)) - Fix some function names in comments ([#​13443](https://github.com/traefik/traefik/pull/13443) [@​blackflytech](https://github.com/blackflytech)) - Add [@​nandorKollar](https://github.com/nandorKollar) as a current maintainer ([#​13451](https://github.com/traefik/traefik/pull/13451) [@​emilevauge](https://github.com/emilevauge)) - Add [@​amazon7737](https://github.com/amazon7737) as a current maintainer ([#​13450](https://github.com/traefik/traefik/pull/13450) [@​emilevauge](https://github.com/emilevauge)) - **\[middleware]** Clarify buffering middleware defaults ([#​13401](https://github.com/traefik/traefik/pull/13401) [@​amazon7737](https://github.com/amazon7737)) - Fix grammar in TLS, TCP service, and routing reference docs ([#​13461](https://github.com/traefik/traefik/pull/13461) [@​almightymoon](https://github.com/almightymoon)) - Fix X-Forwarded-Prefix documentation for dashboard redirection ([#​13472](https://github.com/traefik/traefik/pull/13472) [@​kevinpollet](https://github.com/kevinpollet)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNTAuMSIsInVwZGF0ZWRJblZlciI6IjQzLjE1MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: #18 Co-authored-by: Renovate Bot <renovate@jfreudenberger.de> Co-committed-by: Renovate Bot <renovate@jfreudenberger.de>
134 lines
4.5 KiB
Nix
134 lines
4.5 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
|
|
cfg = config.services.traefik-docker;
|
|
|
|
in {
|
|
|
|
options.services.traefik-docker = {
|
|
enable = lib.mkEnableOption "traefik web server hosted as OCI container";
|
|
dashboardUrl = lib.mkOption {
|
|
description = "External URL the traefik dashboard will be reachable from, without protocol";
|
|
type = lib.types.str;
|
|
};
|
|
dnsSecrets = lib.mkOption {
|
|
description = "Secrets for DNS providers.";
|
|
type = lib.types.listOf lib.types.anything;
|
|
};
|
|
dnsChallengeProvider = lib.mkOption {
|
|
description = "Name of provider for DNS challenge.";
|
|
type = lib.types.str;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
virtualisation.oci-containers.containers = {
|
|
traefik = {
|
|
image = "traefik:v3.7.7@sha256:1cb3845d7a05e1473c9086351426597e911db49db382b6e4769f9b0744962ac8";
|
|
cmd = [
|
|
"--providers.docker=true"
|
|
"--providers.docker.endpoint=http://docker-socket-proxy:2375"
|
|
"--providers.docker.exposedByDefault=false"
|
|
"--providers.docker.network=traefik"
|
|
"--providers.file.directory=/dynamic-config"
|
|
"--log.level=INFO"
|
|
"--api=true"
|
|
"--ping=true"
|
|
"--entrypoints.web.address=:80"
|
|
"--entrypoints.websecure.address=:443"
|
|
"--entrypoints.websecure.transport.respondingTimeouts.readTimeout=0"
|
|
"--entrypoints.websecure.transport.respondingTimeouts.idleTimeout=0"
|
|
"--entrypoints.websecure.transport.respondingTimeouts.writeTimeout=0"
|
|
"--serverstransport.forwardingtimeouts.responseheadertimeout=0s"
|
|
"--serverstransport.forwardingtimeouts.idleconntimeout=0s"
|
|
"--entrypoints.web.http.redirections.entrypoint.to=websecure"
|
|
"--entrypoints.websecure.asDefault=true"
|
|
"--entrypoints.websecure.http.tls.certresolver=letsencrypt"
|
|
"--certificatesresolvers.letsencrypt.acme.email=contact@jfreudenberger.de"
|
|
"--certificatesresolvers.letsencrypt.acme.storage=/certs/acme.json"
|
|
"--certificatesresolvers.letsencrypt.acme.dnschallenge=true"
|
|
"--certificatesresolvers.letsencrypt.acme.dnschallenge.provider=${cfg.dnsChallengeProvider}"
|
|
"--providers.file.filename=/dynamic-config/providers.yaml"
|
|
];
|
|
autoStart = true;
|
|
ports = [
|
|
"80:80"
|
|
"443:443"
|
|
];
|
|
networks = [
|
|
"traefik"
|
|
"docker-socket"
|
|
];
|
|
environmentFiles = lib.forEach cfg.dnsSecrets (secret: secret.path);
|
|
volumes = let
|
|
traefik-providers-config = (pkgs.formats.yaml {}).generate "traefik-providers-config" {
|
|
tcp.serversTransports.pp-v2.proxyProtocol.version = 2;
|
|
};
|
|
in [
|
|
"/var/run/docker.sock:/var/run/docker.sock"
|
|
"${traefik-providers-config}:/dynamic-config/providers.yaml:ro"
|
|
];
|
|
extraOptions = [
|
|
''--mount=type=volume,source=certs,target=/certs,volume-driver=local''
|
|
"--ip=172.18.0.2"
|
|
"--add-host=host.docker.internal:host-gateway"
|
|
"--health-cmd=wget --spider --quiet http://localhost:8080/ping"
|
|
"--health-interval=10s"
|
|
"--health-timeout=5s"
|
|
"--health-retries=3"
|
|
"--health-start-period=5s"
|
|
];
|
|
};
|
|
docker-socket-proxy = {
|
|
image = "tecnativa/docker-socket-proxy:v0.4.2";
|
|
autoStart = true;
|
|
networks = [
|
|
"docker-socket"
|
|
];
|
|
environment = {
|
|
CONTAINERS = "1";
|
|
};
|
|
volumes = [
|
|
"/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
];
|
|
};
|
|
};
|
|
|
|
systemd.services."docker-traefik" = {
|
|
after = [
|
|
"docker-network-traefik.service"
|
|
"docker-network-docker-socket.service"
|
|
];
|
|
requires = [
|
|
"docker-network-traefik.service"
|
|
"docker-network-docker-socket.service"
|
|
];
|
|
};
|
|
|
|
systemd.services."docker-network-traefik" = {
|
|
path = [ pkgs.docker_29 ];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
};
|
|
script = ''
|
|
docker network inspect traefik || docker network create traefik --ipv4 --ipv6 --subnet=172.18.0.0/16 --gateway=172.18.0.1
|
|
'';
|
|
};
|
|
|
|
systemd.services."docker-network-docker-socket" = {
|
|
path = [ pkgs.docker_29 ];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
};
|
|
script = ''
|
|
docker network inspect docker-socket || docker network create docker-socket --ipv4 --ipv6 --subnet=172.19.0.0/16 --gateway=172.19.0.1
|
|
'';
|
|
};
|
|
|
|
};
|
|
}
|