-
Notifications
You must be signed in to change notification settings - Fork 128
Allow changing service source in railway environment new
#702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
coffee-cup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand the usecase for this functionality. And having it tied to the railway environment new behaviour does not make sense imo. I think this would make more sense as a new command all together. This would keep the commands have a single responsibility instead of a "god" command that can do multiple unrelated things
|
The use case here is so that users can create pseudo PR environments that have services that actually deploy from there PR branch |
|
I would like to see this merged. My use case involves deploying pull requests from GitHub Actions by copying the production environment. If the source action is added as its own command, the duplicated one will deploy first with the copied environment branch, and all start-up scripts will run for that branch. I want to deploy the current pull request branch instead. |
|
Thoughts on passing the config as JSON or something? The command |
|
What is unclear about the usage that is currently specified? I'm not sure if parsing the config as JSON would be much better though. |
|
btw: currently, due to staged changes not being available on the public API, if you change the source & variables for a service it will make 2 deployments. if staged changes were available on the public API, this could be done in one deployment. |
|
Glad that staged changes will be made public soon! I like the idea of being able to select what to configure a service. I'm going to add a multi-select for all the options that can be picked, so that more can be added in the future. |
|
hosmelq, that is correct, you cannot non-interactively enter a 2FA code, so destructive actions are not possible in CI flows. This is mentioned in our docs. You would need to manually clean these up after the fact. |
I should have a PR/demo soon. Ideally any config should be editable for the service (staged or applying right away) for both in an environment and when creating a new environment with |
|
I've started working on the multi-select functionality, currently with just service sources & variables. If you want it to be editable for an existing environment (whilst not making a new one), would you want a different command? Maybe And when you say any type of option, could you be more specific? The main things I could think of would be public networking stuff (generating domains, adding domains) but that can already be done through the |


This allows changing service source in railway environment new to either a Docker image or a GitHub repo.
If a GitHub repo is provided, a branch must also be provided. No validation is performed on Docker images due to the many forms they can come in (e.g
ghcr.io/...., ubuntu, _/node:latestetc.Examples
railway environment new foo --duplicate bar --service-sources baz github nodejs/node/master- change the source of the servicebazto the GitHub repo nodejs/node/master. Note that a branch is requiredrailway environment new foo --duplicate bar -s baz docker ubuntu:latest- change the source to a docker image of ubuntu:latestIt also works fully interactively:
Screen.Recording.2025-11-26.at.13.48.07.mov
(note that the query for making a new environment seems to be slowing it down so much due to a change introduced waiting for the environment to be actually duplicated).
Validation is also provided for GitHub repos: