Created
February 4, 2019 13:44
-
-
Save arocks/381efb0faf1e2a9a1ccc003277dfb4bb to your computer and use it in GitHub Desktop.
Create a new environment variable called SECRET_KEY with a new random value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config:set SECRET_KEY=(python -c 'import random; import string; print("".join([random.SystemRandom().choice("{}{}{}".format(string.ascii_letters, string.digits, string.punctuation)) for i in range(50)]))') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Windows, do this in two steps:
C:\project> python -c "import random; import string; print(''.join([random.SystemRandom().choice('{}{}{}'.format(string.ascii_letters, string.digits, string.punctuation)) for i in range(50)]))"
and then
C:\project> heroku config:set <the result from last command>