detect environment using an environment variable and make the local database config use env variables