Report this

What is the reason for this report?

Automatic Deployment on Git: where to put .env

Posted on March 13, 2021

Hi,

I’m just getting my feet wet with Docker, and automatic deployment to Digital Ocean from git. What are best practices to deal with the .env file? In particular, my repo is public but I’d like to keep the .env file away from prying eyes. It sounds like I would nee to commit it to my deploy branch, but course, I wouldn’t want it in my commits. How can I keep it private while making use of the automatic deployment?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.