Question

How to pass env variable within django app to digitalocean droplet

Hi there, I have deployed a django app using this tutorial:

https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04#create-and-configure-a-new-django-project

Now i want to create env variables for secret keys and api tokens. The problems is, i deploy my app through github and if i add .env to gitignore it will not be pulled to the droplet. And if i dont add gitignore, the will no point to create .env

So how can i pass .env file to droplet through github (I want to make the repo public)

Thank you in advance :)

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!