Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to use traefik label #4

Closed
mattthhdp opened this issue Jun 16, 2021 · 6 comments
Closed

Possibility to use traefik label #4

mattthhdp opened this issue Jun 16, 2021 · 6 comments

Comments

@mattthhdp
Copy link

It would be pretty awesome to be able to use the traefik label. Do you think this is something possible without too much hassle ?

@Inlustra
Copy link
Collaborator

Inlustra commented Jun 16, 2021

Actually all of the labels required are configurable through environment variables already! (Though I haven't tested that side of it just yet)

export const environment = () => ({
  nameLabel: process.env.DOCKER_DASH_NAME_LABEL ?? "dockerDash.name",
  categoryLabel:
    process.env.DOCKER_DASH_CATEGORY_LABEL ?? "dockerDash.category",
  iconLabel: process.env.DOCKER_DASH_ICON_LABEL ?? "dockerDash.icon",
  linkLabel: process.env.DOCKER_DASH_LINK_LABEL ?? "dockerDash.link",
  parentsLabel: process.env.DOCKER_DASH_PARENTS_LABEL ?? "dockerDash.parents",
  dockerSocket: process.env.DOCKER_SOCKET ?? "/var/run/docker.sock",
  dockerHost: process.env.DOCKER_HOST,
  dockerPort: process.env.DOCKER_PORT,
  dockerProtocol: process.env.DOCKER_PROTOCOL as
    | "https"
    | "http"
    | "ssh"
    | undefined,
  dockerVersion: process.env.DOCKER_VERSION,
  fileStoragePath: process.env.DOCKER_DASH_FILE_STORAGE_PATH,
});

Feel free to launch the container with whatever you'd like the labels to be, I suppose in your case it would be to override the name label?

In which case when launching the container change the env: DOCKER_DASH_NAME_LABEL

@mattthhdp
Copy link
Author

mattthhdp commented Jun 16, 2021 via email

@Inlustra
Copy link
Collaborator

That's already implemented, can you give it a try?

@mattthhdp
Copy link
Author

mattthhdp commented Jun 16, 2021 via email

@Inlustra
Copy link
Collaborator

It's worth mentioning that as of v2, these options are no longer configured using environment variables.
Instead you will have to use the config instead, an example config:

{
  "$schema": "https://github.com/Inlustra/auto-docker-dash/releases/download/v2.0.0/schema.json",
  "connectors": [
    {
      "type": "docker",
      "config": {
          "labelConfig": {
              "categoryLabel": "mycustomdockerlabel",
              "iconLabel": "mycustomdockerlabel",
              "linkLabel": "mycustomdockerlabel",
              "nameLabel": "mycustomdockerlabel",
              "parentsLabel": "mycustomdockerlabel"
          }
      }
    }
  ]
}

@Inlustra
Copy link
Collaborator

I'm going to close this, as the possibility to do such a thing does exist, if you have any other issues with this functionality, I'll re-open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants