elixir-mongo / mongodb_ecto

MongoDB adapter for Ecto
Apache License 2.0
368 stars 126 forks source link

Distillery ENV vars not working for Mongo Adapter #147

Open mthomps4 opened 6 years ago

mthomps4 commented 6 years ago

ENV vars are not making a full connection through the Mongo.Ecto Adapter. Distillery build with ENV Vars:

REPLACE_OS_VARS, 
DB_NAME, 
DB_HOST, 
DB_PORT, 
HOST, 
PORT

Returning Empty results -- Acts like Mongo is connected?

Test case built here: https://github.com/mthomps4/MongoEcto-Envtest Details outlined in README.md

ankhers commented 6 years ago

This is happening because we are taking the configuration at compile time here. I believe this is the expected behaviour for Ecto 2.1. Once I can finally update things for Ecto 2.2+, you should not have this problem anymore.