
Keeping Configuration Less Error-prone, Simple to Manage and Maintain
Published: 5/7/2025
Image by Joshua Woroniecki from Pixabay
It is a sin to ever commit .env file into version control. You cannot stress this enough.
Lot of projects use .env files, in one form or the other, to store environment variables for their ease of use, flexibility and portability. As the file part of the code base, one has to be extremely cautious as not to add .env file to version control. Best practice is to add .env to .gitignore as soon as possible.
Application configuration data, as we all know, contains some sensitive information too. There is always a risk of leakage of such information.
Also, there is no good method to share such files among dev team, devops, clients, etc. It is becoming extremely necessary to share this information, specially in the new world, as we do not work on project in silos.
Configry safeguards against such risks in various ways:
- There is no configurable artefact containing environment variables
- Configuration is managed in the cloud with proper credentials in a portable manner
- Follows separation of concerns principle as all the data is managed outside the main code base
- Sharing configuration data is simple and built into the application