a year ago
Reproduction steps:
Use project https://railway.app/project/4a201022-9e30-43fb-a877-ff80bb0bb94a
A project with frontend and backend
Frontend uses backends RAILWAY_PUBLIC_DOMAIN to point to the backend URL
Backend uses frontends RAILWAY_PUBLIC_DOMAIN to configure CORS
make copy of project
redeploy frontend + backend at the same time
expected: RAILWAY_PUBLIC_DOMAIN is set on both of them - frontend needs it for API calls, backend needs it for CORS
actual: RAILWAY_PUBLIC_DOMAIN not set. Workaround is removing public network route and add it again.
Here you see this bug in action: https://railway.app/project/4a201022-9e30-43fb-a877-ff80bb0bb94a frontend has no RAILWAY_PUBLIC_DOMAIN, even tought public routing is enabled (and the service is accessible throught public route) backend references this (not existing) variable in it's CORS configuration and of course fails to config cors correctly.
I experienced this the other way around earlier today, that the backend had no RAILWAY_PUBLIC_DOMAIN and thus the config of my frontend failed.
Both containers expect the RAILWAY_PUBLIC_DOMAIN variable of the other project to exist when they are first build.
This impacts projects created for PRs for example.