hyperhq/docs.hyper.sh-hyper

Mention that `links` is mandatory (unlike to docker compose)

adius opened this issue · 5 comments

adius commented

From https://docs.docker.com/compose/compose-file/compose-versioning:

By default, every container joins an application-wide default network, and is discoverable at a hostname that’s the same as the service name. This means links are largely unnecessary.

In hyper however it only seems to work if the link is explicitly specified.

For example in following compose file the links should not be necessary:

version: '2'
services:
  mongo:
    image: mongo
    expose:
      - 27017
  app:
    image: some-nodejs-app
    fip: 185.232.231.123
    depends_on:
      - mongo
    links:
      - mongo
    ports:
      - 3000:3000

The hostname of each container is connectable in your network, you may set the mongo service's hostname as mongo and try it again.

Thanks,

adius commented

@carmark, are you a bot? You answer makes no sense 😂

adius commented

Sorry, this was rude. ^^

I got your concern. The hyper compose does not have a default hostname same as service name, it will use the prefix of container ID as the hostname if you do not specify.

We will consider to implement it, just created a feature request to log this: hyperhq/hypercli#240.

Regards,

adius commented

I mean you claim to be compatible with docker compose, but I had to change so many things from my compose file, that I'd consider it another language.
You should really get this right as I think for many it's the most compelling argument to use hyper.sh.