Updating external services with Convex preview url on new preview deployment
I have a staging branch that collects all changes before pushing to main. I am using Vercel to deploy Convex along with my client side code. The application uses service workers hosted on Railway and sort of uses Convex tables as a job queue, so those external services need to update Convex tables. Given that, I currently need to manually update the convex url in my Railway env variables each time I push to staging and trigger a new Convex deployment. When Vercel runs the build command on a new push to staging, the new Convex URL is generated for the preview deployment. Is there a clean way to automatically tell railway "Convex URL has changed to x" during the Vercel build other than waiting for the new preview deployment url to be created, manually updating Railway CONVEX_URL and then redeploying the Railway infra?
I can think of ways to do this that would make me sad, but before doing that I was wondering if anyone has an elegant solution, given this is likely a common issue.
1 Reply
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!