mozillascience / PaperBadger

Issuing badges to credit authors for their work on academic papers
https://badges.mozillascience.org/
Mozilla Public License 2.0
95 stars 45 forks source link

Allow BADGES_SECRET env variables to be overridden with docker #206

Closed 40thieves closed 8 years ago

40thieves commented 8 years ago

docker-compose does not read environment variables unless they are specified in the docker-compose.yml, which is annoying if trying to override env vars like BADGES_SECRET without changing the default.env file

I'm not really an expert on docker, and I couldn't find a good reference on this (apart from this which is a little vague), so if there's a better way that I'm missing please let me know 😄

josmas commented 8 years ago

Hi @40thieves thanks for this. Did you, by any chance, clone before we merged https://github.com/mozillascience/PaperBadger/commit/094d86509b361dfd946bf98f0bffd51b88e37fb6 ?

The docker setup should now use the same env config as a local setup. Please have a look at the changes in the Readme and let us know if that fixes the issue. Thanks!

josmas commented 8 years ago

Actually, I linked to the wrong commit. This is the one with the changes in the readme https://github.com/mozillascience/PaperBadger/commit/60db48b963b5b9d00c592c6078b464b6e7d66174

40thieves commented 8 years ago

Hmm. I didn't spot that you can override default.env with your own .env. I was overriding with BADGES_SECRET=whatever docker-compose up, which requires this change.

I guess that's the recommended method so I'll close this out then.

josmas commented 8 years ago

thanks for confirming @40thieves !