docker run -p 4567:4567 \ -e username="username" \ -e password="password" \ -v ./urls.sqlite:/urls.sqlite \ -e db_url=/urls.sqlite \ -d simply-shorten:latest
Rusty didn't forget. If you read it closely you will see the 2 quote sections regarding the same.
Seems that yourls can’t talk to your mariadb instance. Share your maria and yourls configurations and we can take a better lookHey guys,
I’m pretty new to all of this so please be gentle
I wanted to run yourls via docker on a Synolgoy NAS and pretty much followed the instructions here.
But I can’t get it to work, the log says:
Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 17
MySQL Connection Error: (2002) Connection refused
Seems like I messed something up with the MariaDB configuration?
Any tips or hits are greatly appreciated!
Well there are members here that also have had problems with crossing docker container communication with the local installed service via package center.Running via Package Center and yes, I'm able to access it.
From the UI menu you will be able to verify it by going to the port menu. If the ports settings page is "off limits" then you are running in host mode.okay, the container is running on host now (at least I think^^).
Is there a ways I can verify that?
Atm, maria is running on it default port (3306) or sometimes on 3307. If the yourls container can stay up and running even if you get that connection error, you could try and use the Terminal window for that container in order to test your connection towards Maria instance. If that will work then network visibility is not the issue.yourls still throws mysqlconnection refused.
I imagine I'll have to change the address and port now?
bashand hit return. You should land in a terminal root of yourls container (similar to this),
apt-get update, to get the latest updates of repositories and after that install
telnetcommand by using:
apt-get install telnet.
telnet yourNASip mariaDBPortnumberand hit return. Something like this, telnet 192.168.10.20 3306.
Trying 192.168.10.20... Connected to 192.168.10.20. Escape character is '^]'.