-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When "Running in a single container" and using external Mysql is not working. #20
Comments
@leftyb Out of curiosity, where are you setting the |
@leftyb you should probably use the multi-container version as opposed to single container if you want to move the db and keep things tidy |
Ah sorry looks like I tried to open the same ticket Document says to do something like this docker run -tid --name homer5 -p 80:80 -p 9060:9060/udp sipcapture/homer-docker --dbhost 10.0.0.1 --dbuser homer_user -dbpass homer_password files like configuration.php rotation.ini do not get passed these values, although the run script seems to attempt this for at least the rotation file. Additionally the "run.sh" script attempts to use root to create and initialise the db tables (this is not passed either using the above example) |
@lmangani can I suggest updating the docs to reflect that multi-container version is required to use an external mysql DB. The current docs are what is leading people to try this. It wasn't too much pain to get it working in a single container though. |
@shaunbro how about contributing back the fixes instead? ;) |
@lmangani , yes happy to although in my case I haven't really "fixed" the issue, more hacked around it! I can detail everything I came across that needed to be changed. I had 2 major issues the first was that I couldn't restart the container if it was stopped, the run.sh script seems to fall over in this scenario. This lead to the second issue which was to move the DB externally so I could achieve persistent data as well as kill/delete/restart the container without losing any data or settings. My current approach is to break out the following files/dirs The rotation issue looks like it is a simple one export PATH_ROTATION_SCRIPT=/opt/homer_rotate
export PATH_ROTATION_SCRIPT=/opt/homer_rotate The configuration.php file has an issue with substitution in the run script (from run.sh) HOMER API CONFIGPATH_HOMER_CONFIG=/var/www/html/api/configuration.php Replace values in templateperl -p -i -e "s/{{ DB_PASS }}/$DB_PASS/" $PATH_HOMER_CONFIG needs to be HOMER API CONFIGPATH_HOMER_CONFIG=/var/www/html/api/configuration.php Replace values in templateperl -p -i -e "s/{{ DB_PASSWORD }}/$DB_PASS/" $PATH_HOMER_CONFIG kamailio.cfg it has a number of issues again the perl substitution is wrong KAMAILIO CONFIGexport PATH_KAMAILIO_CFG=/etc/kamailio/kamailio.cfg Replace values in templateperl -p -i -e "s/{{ LISTEN_PORT }}/$LISTEN_PORT/" $PATH_KAMAILIO_CFG should be KAMAILIO CONFIGexport PATH_KAMAILIO_CFG=/etc/kamailio/kamailio.cfg Replace values in templateperl -p -i -e "s/{{ LISTEN_PORT }}/$LISTEN_PORT/" $PATH_KAMAILIO_CFG and finally localhost is hardcoded in a number of places line 88 line 93 |
could you kindly send a Pull Request with the changes so we can check each in detail with no ambiguity? greatly appreciated! |
I had the same issue. |
I'm trying to launch it in a mutli-container environment, but I'm not finding good directions how to do it without using docker compose. I'm using rancher. When I launch the containers, I just see
|
@shaunbro can you submit a PR with those changes for everyone? |
@lmangani thanks! I'll try it! |
@lmangani for starters, there's no entry for |
@mattwilliamson please open a new issue if you want to check that out. As mentioned it'll need some work. |
got the same isssue my log |
Scripts is trying to connect at 127.0.0.1 even if --dbhost is set.
As well it is necessary that the container creates and populates all the necessary databases if not exist at the remote server.
I will try to contribute on that.
Regards.
The text was updated successfully, but these errors were encountered: