Conversation
Clean up settings guards for helpful hints setting environment settings.
| run: python manage.py migrate | ||
| on: master | ||
| api_key: | ||
| secure: "FE+fi/wY2+LfPP2WZW1Tvvw24+ijldCr7BqIzeeHtKIdu8QK5WOhgdZ8rgkUXtoeGWx3j9vvGeaRCdmQr06kfJ2qk8dsidKSxiAPu3uvL4ppGwqhB+EqgDdMNoUKvStYeBdSNYOpytWYUOdKMu6DPUGwMxGQwItwmtNAHYTZ4ciTno6sdIaFi0/UXoPixGAgvxR+VzgNANy6+86Kl4dO9LMAHmeaPPebmQFOV4WvutEoryHsPklOJHDFEBcUnqRA1YK1FPPZ9Fpy88ZPF6Alx8O0f5B3TxadSgtEqgTMp7FGkpcGE9dh4/Tb6MESm/6l3EANNEEMs9iCqpvA3dboTcSqUkb7yqbEqt5Th5pB/gWxthgvlM25EiE/hCa36jB8kUAO/XjaH1QKBr7SwtvywzDdW4Xn5JXlsunQa3eW/GDUV4oADwRjGjq6kqQADj+FX19jLMR+NhBjZvJ4qQx43wSz8yKBWURl/oN/9B2YuEJJ//OtA8mEtLtL0vphiNXp4T6w/RcVL8hj5Jfe61ULgfX51QwRjbnzXJf0JurvfOZJBbO48K8ZPv0u1FTZ7Bn2QjSGo/bha+IHwUyqjaBEudrpbShE+BQ+YNcBOB2YnR0Zgi1n4snO1uZ3+V0HirtTsiHfDJdSA07l8jDWW4x9lbDFTmXEA6UwYOsOohTwZgc=" |
There was a problem hiding this comment.
We should put this key in an environment variable.
There was a problem hiding this comment.
I didn't think you could store Travis deploy secrets in an environment variable. As far as I know, storing encrypted secrets in the Travis config is the preferred way to do this.
| @@ -1,5 +1,5 @@ | |||
| [](https://travis-ci.org/adborden/ballot-api) | |||
| Status](https://travis-ci.org/caciviclab/ballot-api.svg?branch=master)](https://travis-ci.org/caciviclab/ballot-api) | |||
There was a problem hiding this comment.
Will we be using the master branch for CI? or do we want to use an integration (or other name) for it?
There was a problem hiding this comment.
Let's just start with master. If we add additional environments we can change the branch later.
| 'caciviclab-ballot-api.herokuapp.com', | ||
| ] | ||
|
|
||
| if 'ALLOWED_HOSTS' not in os.environ: |
There was a problem hiding this comment.
Try this:
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', ['*'])
When it's stored in an env variable, we should be able to format like so:
export ALLOWED_HOSTS="['host.com', 'herokuapp.com', '*.localhost']"
| if 'SECRET_KEY' not in os.environ: | ||
| raise Exception('SECRET_KEY environment variable must be set for heroku configuration.') | ||
|
|
||
| SECRET_KEY = os.environ.get('SECRET_KEY') |
There was a problem hiding this comment.
Same as for ALLOWED_HOSTS
SECRET_KEY = os.environ.get('SECRET_KEY', 'set_the_secret_key')
This should be merged before #2