Sync DB_URL env var into my Vercel Preview git-branch-base environment
I have enabled PR environments so when I create a PR on GitHub I retrieve a new env automatically created on Railway (e.g.: myapp-pr-1) with all new environment variables (e.g.: DATABASE_URL).
I host my database on Railway and my Nextjs app on Vercel.
I have also enabled the Vercel integration to sync all environments variables... But my Railway environment freshly created by my GitHub PR don't sync my database environment variables to my Vercel Preview environment (related to my GitHub PR branch of course - see the screenshot attached).
I can sync that way:
- Railway production -> Vercel Production
- Railway any-env -> Vercel Preview
I see anything to sync that way:
- Railway myapp-pr-1 -> Vercel Preview (git branch)
Is there a way to sync all my PR-based database environment variables into my git-branch-based Vercel Preview environment?
Thanks for you help.
11 Replies
Hey @ChristoRibeiro - can you share your project-id please?
Hi @Angelo here is 850ce514-360c-490f-bb8c-2498054596c6
Any idea @Angelo ?
@Angelo Nope?
Oh dear super sorry
Been in a couple of rabbit holes today
Once I am at my desk- will adress this
Keep in mind
<#850421848797741096> - don’t tag the team.
Sorry for the tag 🫢
@ChristoRibeiro - yep, just found the convo that got buried, so we don't have a read into the vercel PR env when its made hence why we can't sync it that way
Meaning, when a PR is made, Railway isn't aware of the vercel PR env to pass variables to.
Now good news, Greg, our engineer working on the variables experience is going to make this connection bi-directional so Vercel can talk to us to share vars. But it will be some time.
Sorry again for the late reply, things have been hectic and trying to hire for support.
Thanks for your transparency.
Is there a way to track the progress of what Greg will do about the issue?
Hmmm, what you described is like my dream of having you peer into our roadmap and you get to see a ticket get dragged into completion.
I don't think thats now possible unless he decides to jump in this thread. However, I think we will have something about this in the changelog tomorrow.
is this implemented as 2024? i cannot see my pr environment on the integration page
+1. also looking for this feature!
@Michael Li any other ideas how to achieve the preview <> preview integration?
i'd imagine this is the main reason folks are using railway
a solution to this could be to run what you are running on vercel on railway instead
@Brody interesting idea, but we're very happy with hosting our nextjs app on vercel