10 months ago
I want to know if it is currently possible to choose the region to deploy a service on. I have tried and seen so documentation for this. The GraphQL doesnt let you set one when creating services, and I am sort of stumped.
13 Replies
10 months ago
Managed to find this GraphQL query for updating regions: https://github.com/railwayapp/cli/blob/master/src/gql/mutations/strings/UpdateRegions.graphql
CLI command: https://github.com/railwayapp/cli/blob/42d51b13d930649515abbf8df5a5d671c91760d8/src/commands/scale.rs#L174
10 months ago
Looks like its just updating the multi region config
10 months ago
Does this mean we can use the multiregion config, put in only 1 region and a replication there, and it forces the service to be deployed there?
10 months ago
I would assume so
10 months ago
Oh yeah brody reacted 😅
10 months ago
Thank you
10 months ago
Last question ig would be how am I passing in the JSON?
{
"us-west2": {
"numReplicas": 2
},
"us-east4-eqdc4a": {
"numReplicas": 2
},
"europe-west4-drams3a": {
"numReplicas": 2
},
"asia-southeast1-eqsg3a": {
"numReplicas": 2
}
}
}Does this work? or I need to add something else
10 months ago
I say just give it a try and see if it works.
Couldn't really find anything regarding the JSON schema myself unfortunately.
10 months ago
It's shown in the docs under the cac page
10 months ago
Oops thanks.
@OBO your configuration looks good.
10 months ago
Thank you both!
10 months ago
Works like a charm
10 months ago
🔥
Status changed to Solved brody • 10 months ago