Friday, March 30, 2018

Re: Decoupling Postgres database credentials in django for deployment.

Environment variables are the best option for not embedding sensitive information in files
However some people (me that is :-) think that environment variables, though widely used, are an ugly hack for this problem.


I explain the way I do it (TLDR; production settings must be stored in a different "deployment" repository, preferably with any secrets encrypted) in https://www.crowdcast.io/e/deploying-django, from 38m10s to 46m30s.


Regards,


Antonis

Antonis Christofides  http://djangodeployment.com

On 2018-03-30 13:06, PASCUAL Eric wrote:

Hi,


Environment variables are the best option for not embedding sensitive information in files which have chances to be stored in places such as external source repositories (GitHub et al.).


If you are working with orchestrators such as Kubernetes, you can use the "secrets", which are specialized shared configuration data, stored in encrypted form. As shared configuration data, they bring the extra benefit over env vars of being manageable from a single central place, and then distributed to all the replicas and services which need them.


Best regards


Eric


From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf of Andréas Kühne <andreas.kuhne@hypercode.se>
Sent: Friday, March 30, 2018 11:08:52 AM
To: django-users@googlegroups.com
Subject: Re: Decoupling Postgres database credentials in django for deployment.
 
Hi, 

I am sorry, but this doesn't really make sense. What do you mean by decoupling the data? 

Deploying to the cloud, will mean that you will need to setup a new database for your project - there you will get a completly new database, that won't be connected to your development data in any way. 

You can then add system variables for the username and password for the database - and thats about all you need?

Regards,

Andréas

2018-03-29 22:24 GMT+02:00 prince gosavi <princegosavi12@gmail.com>:
Hi,
I have made a django project and want to deploy it on cloud.
Before that i want to decouple all the private information.
I want to decouple the database info too, like the username password etc.
Any help is appreciated.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4b09223d-d58f-4fda-b3f7-64b230960d94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCeZFiw9D7Sa213H_MkPgcH-aTQ3fk-j5HLjZdHK%2B5ps%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/DB7P193MB0331039E86ABAEFF1B794D898CA10%40DB7P193MB0331.EURP193.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment