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

register multiple services on one port #653

Open
arnoldyahad opened this issue Feb 10, 2019 · 0 comments
Open

register multiple services on one port #653

arnoldyahad opened this issue Feb 10, 2019 · 0 comments

Comments

@arnoldyahad
Copy link

arnoldyahad commented Feb 10, 2019

using latest registrator
i want to use registrator to register 2 or more services on the same port

  consul:
    image: consul:1.4.0
    container_name: consul
    hostname: consul
    ports:
      - "8500:8500"
      - "8600:8600/udp"
      - "8301:8301"
      - "8301:8301/udp"
      - "8302:8302"
      - "8302:8302/udp"
    volumes:
      - "../../conf.d:/conf.d"

  aerospike:
      image: aerospike:latest
      container_name: aerospike
      hostname: aerospike
      ports:
        - "3000:3000"
      volumes:
        - "../../conf.d:/conf.d"
      labels:
        SERVICE_3000_NAME: "foo-aerospike"
        SERVICE_3000_NAME: "bar-aerospike"

  registrator:
    image: gliderlabs/registrator:latest
    command: "consul://127.0.0.1:8500"
    container_name: registrator
    hostname: 127.0.0.1
    network_mode: host
    depends_on:
      - consul
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock

my example isnt good because the variables are overwriting eachother
but - in case i want 2 services to be registered on 1 port how can i do this ?

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

1 participant