Improve labels example

This commit is contained in:
Robert Hensing 2021-01-22 10:35:57 +01:00
parent 3d9f19b630
commit bb23a55c8a
2 changed files with 7 additions and 2 deletions

View file

@ -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`)"}
----

View file

@ -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 {