Customizing xibo installation

Hi,
i’m new to xibo. I want to install xibo with docker but customize some settings. So i edit config.env and cms_custom-ports.yml
I want to use mysql on an other host where mysql is already running. So i adjust in config.env the seetings to the remote myqsl server. I want to use custom webports. So i adjust cms-web ports to 81.
I think this should be fine. But in cms_custom-ports.yml i delete the cms-db settings for the mysql installaiton. only mem_limit and env-file is in there.
Then a try to start by typing “docker-compose -f cms_custom-ports.yml up -d” and i get this error:
ERROR: The Compose file is invalid because:
Service cms-db has neither an image nor a build context specified. At least one must be provided.
So i have to put my mysql-settings in there. But how could i set them up to my remote mysql server?
Thanks and regards
Sebastian

Perhaps have a look here Xibo Docker with an external database or have you already followed this guide?

No, i don’t know this guide.
I try to follow this. But in order to understand this: i want to set the cms_database parameters in a file. This could be the cms_custom-ports.yml ?

It would be easier to start with the remote_mysql template, and simply adjust the port numbers in there.

Rather than starting with the custom ports template, and removing MySQL.

The database parameters are all set in config.env. If you use the remote_mysql template version of that, then it has all the information you need in it.

Okay, so i “cp config.env-template-remote-mysql config.env” and then “docker-compose up -d” after setting up the configfile. But after that i get

ERROR: Version in “./docker-compose.yml” is unsupported. You might be seeing this error because you’re using the wrong Compose file version. Either specify a version of “2” (or “2.0”) and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see Overview | Docker Docs

So i take a look in docker-compose.yml and there is also set mysql environment?
So where do i have to set the mysql settings??

Copy config.env-template-remote-mysql to config.env

Edit config.env, giving the details of your MySQL server. Note with a remote MySQL server, the system expects the database to exist, and the user you specify should have access to create tables in that database.

Edit cms_remote-mysql.yml to change the port numbers as you want. It’s only the first number in each pair you change.

So for example:

        ports:
            - "80:80"

will run the webserver on port 80. If you want it on 8080, then it becomes:

        ports:
            - "8080:80"

Then run docker-compose -f cms_remote-mysql.yml up -d

Anywhere in the documentation you see the command docker-compose, you should now replace that when you run it with docker-compose -f cms_remote-mysql.yml

so for example, to restart the containers, instead of docker-compose restart, you would use docker-compose -f cms_remote-mysql.yml restart

Okay, thanks for explaning the install.
I do so. I adjust the cms_remote-mysql.yml and run the command, but i get this:

docker-compose -f cms_remote-mysql.yml up -d
ERROR: Version in “./cms_remote-mysql.yml” is unsupported. You might be seeing this error because you’re using the wrong Compose file version. Either specify a version of “2” (or “2.0”) and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see Overview | Docker Docs

I don’t change anything in the version.
Could i change it to 2.0 ?

What version of docker-compose do you have? I suspect you’ve got a version that came from a package rather than the latest?

You need a reasonably new version of docker-compose.

Okay.
now i have an other error:
In my mysql user for xibo there was an ip-range for my server. But it did not exactly match. Now i set it up right, but i get this message in Browser:
Fatal Error - sorry this shouldn’t happen. SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘xibo.setting’ doesn’t exist

How could i setup again?

You need to down the containers, and then bring them back up again.

docker-compose -f cms_remote-mysql.yml down

Fix the issue with your MySQL server

docker-compose -f cms_remote-mysql.yml up -d

Oh yeah, Thanks a lot. Now its running.

1 Like