portainer / portainer-compose

Compose setup for Portainer
http://portainer.io
681 stars 303 forks source link

Add Traefik network label #21

Closed natlibfi-arlehiko closed 4 years ago

deviantony commented 4 years ago

@natlibfi-arlehiko thanks for the update. Do we really need this label though since this compose setup is actually not specifying any network?

natlibfi-arlehiko commented 4 years ago

Fixed

deviantony commented 4 years ago

@natlibfi-arlehiko Thanks. What I meant is that this was working before actually adding that extra Traefik label. It is really necessary then and why is it required? (e.g. what's not working with Portainer if we omit this label)

natlibfi-arlehiko commented 4 years ago

As the comment says, it does work without the label if the network is defined in Traefik config/parameters.

But even so, the network was not defined in that compose file for either Traefik or Portainer via networks

deviantony commented 4 years ago

@natlibfi-arlehiko yeah but by default Compose will generate a default local network for these services. I'm thinking to comment this label actually and just specify it if you are using an external network?

IMO since this setup currently works fine and it seems that there is no problem with it, we should just keep it as is.

natlibfi-arlehiko commented 4 years ago

Fair enough. But I don't think it's realistic to deploy Traefik to just run Portainer :)

deviantony commented 4 years ago

@natlibfi-arlehiko I agree but I think that this repo should help people have a good start at a valid Portainer + Traefik configuration. Hence why I think the only thing that might be required here is a commented traefik.docker.network label as well as a comment that explains why it might be required.

Can you update to something like this?

# Uncomment this label if your Traefik instance is using a specific Docker network and replace the network name 
# This is not necessary if you set your default network in Traefik config/parameters
# - "traefik.docker.network=your-traefik-network-name"

Thanks !

deviantony commented 4 years ago

Thanks @natlibfi-arlehiko :+1: