I'm trying to run Nexus in swarm with traefik, nexus has a admin interface that runs on port 8081 and also has a nexus docker registry repository running on port 9615.

My goal is access registry through registry.docker.domain and nexus by nexus.domain but I am not able to do this.

traefik config on compose

  - 8081
  - 9615
    - "traefik.enable=true"
    # Config Nexus
    - "traefik.http.router.nexus.rule=Host('nexus.domain')"
    - "traefik.http.services.nexus.loadbalancer.server.port=8081"
    - "traefik.http.routers.nexus.entrypoints=web-secure"
    - "traefik.http.routers.nexus.service=nexus"

    # Config Registry
    - "traefik.http.router.registry.rule=Host('registry.docker')"
    - "traefik.http.services.registry.loadbalancer.server.port=9615"
    - "traefik.http.routers.registry.entrypoints=web-secure"
    - "traefik.http.routers.registry.tls=true"
    - "traefik.http.routers.registry.service=registry"

If I set up only registry labels I can access the registry by https.://registry.domanin and nexus by registry.domain:PORT

If I set up only nexus labels I can access nexus by http:.//Nexus.domain

But the config above, with labels for both at the same time, didn't work, nexus and registry return 404.

Obs: I'm using traefik 2.2, the documentation and the use are very different from 1.6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.