Use Doppler instead of traditional .env files ๐
Pierre-Henry Soria โจ
Posted on February 25, 2024
Why companies should ditch .env files for Doppler?
Okay, letโs face it, it has always been quite archaic to share the right updated .env
files between developers. This occurs either during the onboarding process when new engineers start working within a team or when an engineer merges new release code that adds/updates some variables. The problem is that each .env
file is decentralized on each machine/environment. We need something more secure, robust, and stored in a single centralized location, such as a cloud environment variables management system that enables sharing with ease the secrets and other setting variables of an application.
What if we could all have those configurations on the cloud? And this is where Doppler comes in. With its handy CLI commands, you can ensure you run docker-compose over it, making sure all environment variables will be correctly loaded in the chosen environment.
Doppler is especially useful when working within a medium to large size team and with different environments (pierre-dev, dev, staging, prod, โฆ). No copy/paste of missing environment variables anymore, no need to communicate with our teammates when releasing new env variables that break everyone elseโs local environment, ...
The Downsides
You pay per user, and this could be a significant expense for your company. The more users you have in your team, the higher you pay (currently, it's set at $7/user). However, if you are a student, pursuing a diploma, bachelor, master, ... (even part-time) and you are enrolled in the fantastic GitHub Student Developer Pack, you can have it for free (for a limited time...). Anyway, itโs worth a try ๐
Now, it will give a significant boost to productivity for your team, as well as happiness over the slight frustration that the dotenv files can bring, which is the most important at the end of the day, right? ๐
Alternatives
dotenv has a sister package (still relatively new and not very popular either), called dotenv vault that encrypts and pushes your keys, so that others working with us can easily pull them and retrieve the env variables.
Posted on February 25, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.