Docker documentation on ports

Hi everyone,

Xibo is great!
Docker is great!
Xibo on docker is awesome!

However, I do feel that there is a small mistake in the docker documentation. I refer to this page

This could be easily solved:

In short, the documentation explains how to setup Xibo using Docker. This works like a charm.
When you want to change the ports however, it does mention to change the ports on cms_custom-ports.yml AND docker-compose.yml (atleast this is how I read it).
This is not needed.

When someone wants to change the port, the most straight-forward would be to change it only in the docker-compose.yml file
For example: when you don’t want to use the standard port 80, but use port 8888 to access the login webpage

        - cms-db:mysql
        - cms-xmr:50001
        - XMR_HOST=cms-xmr
    env_file: config.env
        - "8888:80"
    mem_limit: 1g

You may now easily get Xibo up and running using the docker-compose up -d

When you do it like this, it works fine in my understanding. Perhaps more people made the same mistake I made, that why I’d like to share this here

Thank you!

hmm for me the lines under ‘Using different ports’ section are mentioning changing the cms_custom-ports.yml.template to cms_custom-ports.yml and making those changes to ports in that file.
Then to use
docker-compose -f cms_custom-ports.yml up -d
instead of the default
docker-compose up -d

but yes you can edit ports in docker-compose.yml and still use the default command for it.

Could you tell me what line in the documentation implies that changes should be made to both of those files?
Perhaps you’re onto something I unfortunately do not see it.

Hi Peter,

Sure, but let me warn you first: i’m not a native speaker. That would be the reason! (hope not)

step 1:

would prefer to use an alternative port number, then you need to copy the cms_custom-ports.yml.template file and change the ports section for cms-web. The file should be saved as cms_custom-ports.yml.

me: okey, so lets change cms_custom-ports.yml
So basically the container now uses for instance 8080, instead of 80

step 2:

The ports section of a Docker Compose YML file lists ports in the format : - to move to port 8080 the declaration would be 8080:80.

me: oke, so I also change docker-compose.yml

When I do them both, the compose function makes me point towards 80, but there is nothing on port 80 within the container, only at port 8080. The correct way should then be 8080:8080.
Leaving one of the files in their default state is more easy though

Ok, so pretty much this

ie they somewhat unfortunate ‘Docker Compose YML’ which might imply that changes are needed in docker-compose.yml.

that line only shows the port structure in those files (as you now know it’s the same in both of them)

I can see how that could potentially be confusing - we will think how to update it so it’s clearer.

Hi Peter,

Yes, i guess it is more in:

I’m sure you will come up with something brilliant!

thanks for the quick replies,