diff --git a/docs/modules/ROOT/partials/NixOSOptions.adoc b/docs/modules/ROOT/partials/NixOSOptions.adoc index f566cbd..2a97cbb 100644 --- a/docs/modules/ROOT/partials/NixOSOptions.adoc +++ b/docs/modules/ROOT/partials/NixOSOptions.adoc @@ -694,7 +694,7 @@ Default:: Example:: + ---- -{"com.example.foo":"bar"} +{"com.example.foo":"bar","traefik.enable":"true","traefik.http.routers.my-service.entrypoints":"web","traefik.http.routers.my-service.rule":"Host(`my-service.localhost`)"} ---- diff --git a/src/nix/modules/service/docker-compose-service.nix b/src/nix/modules/service/docker-compose-service.nix index ce20bcb..4da0ab3 100644 --- a/src/nix/modules/service/docker-compose-service.nix +++ b/src/nix/modules/service/docker-compose-service.nix @@ -118,7 +118,12 @@ in service.labels = mkOption { type = attrsOf str; default = {}; - example = { "com.example.foo" = "bar"; }; + example = { + "com.example.foo" = "bar"; + "traefik.enable" = "true"; + "traefik.http.routers.my-service.rule" = "Host(`my-service.localhost`)"; + "traefik.http.routers.my-service.entrypoints" = "web"; + }; description = dockerComposeRef "labels"; }; service.links = mkOption {