DEV Community

Discussion on: Where do you store your .env files?

Collapse
 
sonnk profile image
Nguyen Kim Son

This depends on your configuration management tools (Chef, Ansible, Puppet, etc), basically how you deploy your software. In small projects I usually use Ansible script that:

  1. copies the configuration file onto a server
  2. runs the docker image of the program

In this case the configuration file is stored along with the Ansible script. This file can be encrypted using ansible-vault. This setup is not ideal but works quite well for small projects.