make config file recognize when application is being runned under docker
Docker's MySQL service requires that it be used with mysql
as a host-name, thus in the config file, under TestingConfig
class, rather than localhost
it uses mysql
. But when testing under local development, the usual host-name will be localhost
. Although this can be easily overwritten using an environment file .env
, it could be confusing. Thus it could be nice if it can be made dynamic, and change upon recognizing under which server does it currently run, whether in docker or local development.