beingkartik
beingkartik10mo ago

Creating more than one environment

Convex has 2 environment one production and second development. Development can only be used for local development. But i want to create a dev environment similar to production which can be accessed by anyone in the team. Currenly only i can access the development environment. Please help!
8 Replies
erquhart
erquhart10mo ago
Technically anyone in a team can access anyone else's dev environment, just grab the url when you're viewing your dev deployment dashboard and share it out. You could add a fake team member just to use as a staging deployment, most straightforward method I know of.
beingkartik
beingkartikOP10mo ago
I didn't get it. How others can see my development database?
erquhart
erquhart10mo ago
1. Navigate to your Convex Dashboard 2. Navigate to your dev deployment if you're not already there 3. Copy the url in your address bar 4. Share it out If you want others to develop locally against yours or any other development deployment, change the environment variables in your .env.local to the deployment you want to target. I have no idea to what extent this is or isn't recommended by Convex officially as a way to get a staging environment, but it does work currently. And again, they have to be a member of your Convex team to be able to view the link to your dev deployment dashboard.
beingkartik
beingkartikOP10mo ago
Okay got it Thanks
ian
ian10mo ago
You can also deploy to preview backends for a Pro team: https://docs.convex.dev/production/hosting/preview-deployments
Preview Deployments | Convex Developer Hub
Use Convex with your hosting provider's preview deployments
erquhart
erquhart10mo ago
I thought of recommending previews, but wasn't sure they would work as a staging env given their 14 day lifespan.
ian
ian10mo ago
Another pattern I've thought about is having two projects - one where prod is staging, and the other where prod is prod. Team members only use the project with staging, and CI/CD alone deploys to the prod project.
Michal Srb
Michal Srb10mo ago
Deploying Your App to Production | Convex Developer Hub
Convex is built to serve live, production app traffic. Here we cover how to

Did you find this page helpful?