How can I deploy a Github Service to only a single environment, rather than all of them?

I want to have a Github service deployed just to one of my Railway environments (e.g. staging), but when I go to +New add service, the service gets added to every environment I have. Is there a way to indicate I want a service to only exist in a given environment when creating? Deleting the service similarly deletes it in all environments.
7 Replies
Percy
Percy2y ago
Project ID: aa1a93fc-4414-42ac-9398-928082181803
niconico6710
niconico6710OP2y ago
aa1a93fc-4414-42ac-9398-928082181803
Percy
Percy2y ago
You can deploy a GitHub Service to only a single environment by running railway up with an environment selected from the CLI, which will create a deployment using the variables from the Environment.
⚠️ experimental feature
niconico6710
niconico6710OP2y ago
Is there a way to deploy a single Database? e.g. I just tried to deploy a Postgres Database, but it seems it deploys one into every environment? How does pricing work when you have multiple environments e.g. I have a Postgres DB in AWS in this case for production, and I don't need a separate one here necessarily. Right now I'm thinking to actually just make a new Railway project and have that be where the Database lives, and only have a staging env in that project I'm doing all this just to try to figure out the issue in https://discord.com/channels/713503345364697088/1066582066000576554
niconico6710
niconico6710OP2y ago
Doing what Percy Bot suggested wasn't very helpful: I just hit a Failed to deploy with no info on why
jr
jr2y ago
Hi Nico, The issue you reported was a bug and has since been fixed. You may need to re-create the staging and local environments to take advantage of it though As for your previous questions: At the moment, all Railway environments have the same databases and services. What is your usecase for wanting them to be configured separately?
Adam
Adam2y ago
@NicoNico pinging so you see this
Want results from more Discord servers?
Add your server