Automatic Deployment on Git: where to put .env
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?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×