hackoregon / transportation-system-backend

2018 repo for the transportation api backend
MIT License
8 stars 2 forks source link

docker-compose isn't putting environment variables in the images #28

Closed znmeb closed 6 years ago

znmeb commented 6 years ago

As we discovered last night, the Django container wasn't getting the environment variables. It turns out the PostgreSQL container wasn't either.

For some reason, docker-compose isn't picking up the environment variable settings from ./bin/.env even though the docker-compose.yml file specifies that in an env_file directive. If you take the directive out and move .env where the docker-compose.yml file is, it works., So that's what I'm doing.

I have a long-standing policy of not troubleshooting commercial products like Docker - if the default works, I use it. The Best Practices Fairy isn't going to take away any of our wishes if we just put .env where docker-compose.yml expects it. ;-)

znmeb commented 6 years ago

Fixed in my branch - merge request coming after I fix a few other annoying bugs. Probably early tomorrow.

znmeb commented 6 years ago

Fixed in branch znmeb-merge-new-database