HBNetwork / python-decouple

Strict separation of config from code.
MIT License
2.83k stars 196 forks source link

decouple.UndefinedValueError: SECRET_KEY not found. Declare it as envvar or define a default value. #148

Closed harshhes closed 1 year ago

harshhes commented 1 year ago

I am getting this error, while i was deploying my project to AWS ec2 . In my local server it works fine, any suggestions?

hugopenna commented 1 year ago

hey @harshhes Make sure that you have a .env file with your secret_key set in your ec2 machine.

It's quite common to add you .env file to .gitignore so it doesn’t get in the production machine.

harshhes commented 1 year ago

Hey @hugopenna , Thank you for responding, i can't thank you enough for solving this for me. That was so silly of me to not put .env file in my ec2 Instance, i was roaming around all internet for this.

hugopenna commented 1 year ago

No worries, I did that myself a bunch of times.

hugopenna commented 1 year ago

@henriquebastos @lucasrcezimbra may you close this issue?