3 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
3 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
3 months ago
Looks like its just updating the multi region config
3 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?
3 months ago
I would assume so
3 months ago
Oh yeah brody reacted 😅
3 months ago
Thank you
3 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
3 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.
3 months ago
It's shown in the docs under the cac page
3 months ago
Oops thanks.
@OBO your configuration looks good.
3 months ago
Thank you both!
3 months ago
Works like a charm
3 months ago
🔥
Status changed to Solved brody • 3 months ago