12 days ago
We're still in the process of evaluating Railway so please bear with me if I'm just misunderstanding something fundamental.
Say that we have a Development environment and a Production environment. Typically, these would have a few configuration differences, in particular when it comes to env variables. For example, one might have a variable API_URL set to "dev.example.com" in the development environment and "prod.example.com" in production.
However, when syncing environments, it seems like all differences are automatically staged to be merged. It is of course possible to discard these specific changes, but that seems incredibly fragile and prone to mistakes. For this specific example, it might be manageable, but in actual production there can be a much larger amount of much more nuanced differences that aren't as obvious.
What is the recommended way to manage these configuration differences between environments?
1 Replies
Status changed to Awaiting Railway Response Railway • 12 days ago
12 days ago
Variables are independent per environment by design, so setting API_URL to different values in Development vs Production is the expected pattern.
For the sync concern: variables that are sealed are automatically excluded from sync diffs, so they won't show up as staged changes. If you have variables that are expected to differ between environments (API URLs, feature flags, etc.), sealing them will prevent them from appearing during sync. The tradeoff is that sealed variables can't be viewed after deployment, so this works best for sensitive values.
For non-sensitive config that just differs per environment, you'd currently need to review and discard those variable changes when syncing. We understand that gets tedious with many differences. The sync feature is most useful for structural changes like adding/removing services.
Let us know if you have other questions.
Status changed to Awaiting User Response Railway • 12 days ago
5 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 5 days ago