A permanent staging environment
I have followed the docs and created a separate Convex project to deploy to for our staging env. The problem is our staging environment is done as a "custom environment" in vercel which is tagged with "pre-production" as you can only have one production environment per app. During CI build on merges to the staging branch, it's failing with the error "Detected a non-production build environment and "CONVEX_DEPLOY_KEY" for a production Convex deployment."
What is the best way to solve this? Is there a flag that we can add to bypass this error? Because the other solution is to not use vercel for CI for this and deploy the backend and frontend separately, but I find that defeats the purpose of the elegant deployment flow given by Convex.
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
I'm having the same issue - hoping there is a fix coming for this
For now I've decided to use two Vercel projects in addition to two Convex projects, that way "staging" is actually prod in both vercel and convex in one of the projects.