Best way to manage environment variables across multiple projects?
We have several projects, and right now, manually going into the dashboard for each project seems like a massive hassle, and extremely error prone.
For dev we are self hosting on each devs machine, and then for integration, staging, and produciton, we are planning to deploy to convex cloud. What is a good flow for managing environment variables across each of these environments? There is nothing worse, than deploying to production, only to find out that an environment variable you added 3 weeks ago, is crashing the release, and causing problems. What secret / environment variable flows have worked for others?
3 Replies
hi! a few options
1. you can set default environment variables at a project level (https://docs.convex.dev/production/environment-variables#project-environment-variable-defaults )
2. you can script setting environment variables with
npx convex env
( https://docs.convex.dev/cli#read-and-write-environment-variables )Environment Variables | Convex Developer Hub
Store and access environment variables in Convex
CLI | Convex Developer Hub
The Convex command-line interface (CLI) is your interface for managing Convex
thanks!
I supose the scripting option will be our best way forward