I installed Xibo 1.8.2 as a docker container for the first time (no history, fresh installation), I just changed the port to 81 as I already have a web server running on the 80 port
In docker-compose.yml, I changed :
ports:
- “81:80”
Then I launched Xibo :
docker-compose up -d (no errors).
When I connect to my server on firefox (http://myserver:81), I get a fatal error :
Fatal Error - sorry this shouldn’t happen. SQLSTATE[28000] [1045] Access denied for user ‘cms’@‘172.18.0.4’ (using password: YES)
I read a few posts, I tried rm -rf shared, I let without password, I set a password in config.env (MYSQL_PASSWORD=password), I let the default config in docker-compose.yml :
When you’ve changed the ports, did you edit the cms_custom-ports.yml.template cms-web section port as well?
And then renamed it to cms_custom-ports.yml?
I believe you should run the following commands (assuming sql password is correctly saved in config.env and the ports as mentioned above).
docker-compose down
Delete the shared/db folder docker-compose -f cms_custom-ports.yml up -d
Thanks for this answer. I erased the db folder. About the mysql password, I left it blank. How can I guess the password if it is a random one ?
Otherwise I had tried with this custom file but it says that the 80 port is already in use. That is true, but I mapped the 81 to the internal 80 port, and it does not seem to consider my change :
docker-compose -f cms_custom-ports.yml up -d
Creating network "xibodocker_default" with the default driver
Creating xibodocker_cms-db_1 ...
Creating xibodocker_cms-xmr_1 ...
Creating xibodocker_cms-db_1
Creating xibodocker_cms-xmr_1 ... done
Creating xibodocker_cms-web_1 ...
Creating xibodocker_cms-web_1 ... error
ERROR: for xibodocker_cms-web_1 Cannot start service cms-web: driver failed programming external connectivity on endpoint xibodocker_cms-web_1 (2ba1a01b8b8010748fc894f769a12bb66520d8c54bf9ab25e64b1094392d7db9): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: for cms-web Cannot start service cms-web: driver failed programming external connectivity on endpoint xibodocker_cms-web_1 (2ba1a01b8b8010748fc894f769a12bb66520d8c54bf9ab25e64b1094392d7db9): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.
But the connection on the 81 port works launching directly docker-compose.yml with docker-compose up -d
mysql password is not random, it’s set in the config.env file.
Of course you can use random password generator to generate it, but still it will be set to something in that file.
The MYSQL_RANDOM_ROOT_PASSWORD is for root access,the mysql password for your cms user is in the config.env.
If it’s a fresh installation or you’ve deleted the shared/db folder, then please run the down command, set a password in config.env and run the up command.
if you’ve edited the port in docker-compose.yml to be “81:80” then that should be ok as well
Thanks a lot, it works ! In config.env, the password is mandatory
Letting like this :
MYSQL_PASSWORD=
didn’t work. But adding for instance “password” after the “=” made it work. Not immediatly, the daemon takes a bit of time to launch, at the begginning, I thought I didn’t work but it does !
I am now going to explore Xibo. Have a very nice week-end.