September 21, 2021

How to properly manage .env files in a microservices architecture

How to properly manage .env files in a microservices architecture

Hi there!

I have been working for some time on a project with a microservices architecture where each service has its own environment variables which are handled with a .env file for each service/repository.

Gran part of these variables are related to other services IPs and external resources keys which are different in each environment: Development, Staging, and Production so the .env is not a simple one.

Our development pace is fast and most of the time these variables change with new features and or changes implemented by teammates working on issues related to that service. This causes that almost every time others want to work with a service they get blocked and have to update the .env file before. Therefore we end up requesting and sharing .env files with each other all the time and there is a lack of a "Source of truth" for all the .env files.

I was wondering if someone else has had this problem or a similar one before and what approaches has followed to solve it or improve it.

Is there any application or framework for sharing and managing .env files in a team in an automated way?

Thanks in advance!

submitted by /u/reymon359
[link] [comments]