flatline
flatline copied to clipboard
Make mysql container not bind to localhost
Currently the scraper is in host networking mode, in the assumption that it can't otherwise access subnets like 192.168.2.0/24 - therefore mysql has to bind to :3306 on host to expose it to the scraper.
The assumption needs to be checked and if the scraper can go without host networking mode to discover outside nodes - make mysql not bind to :3306 and make the scraper connect to mysql-host mysql
instead of 127.0.0.1
.
Possibly as a temporary workaround check if 127.0.0.1:3306
is used inside install.sh
and then don't bring up another mysql instance.
Another option could be to just have an option inside .env
e.g. EXTERNAL_DATABASE=true
which would prevent the docker mysql container from spawning and adjust laravel to be in host mode, in case the user inputs 127.0.0.1
(which does not resolve to the host, if not in network_mode: host
)