2 years ago
Hello ! 👋
I'm having a heck of a time trying to deploy a postgresql database through the GraphQL endpoint, but I'm able to create the project and post what always ends up being a blank template to said project. I'm looking to deploy both a postgresql database and one of my private github repos.
Deploying A Project
mutation createProject {
projectCreate(input: {name: "that new new"}) {
name
id
}
}Deploying PostgreSQL
mutation deployDatabase {
templateDeploy(
input: {
services: {
serviceName: "postgresql",
template: "postgresql"
},
projectId: "<code>",
templateCode: "postgresql"}) {
projectId
}
}Question - Is what I'm doing possible through the API, and can someone help point me in the right direction?
Thanks in advance!
0 Replies
It seems to not deploy the required environment variables, I might just be missing something from the query that sets these up

2 years ago
there is one dead simple way to figure out how to do this - open your dev tools and watch the networking calls as you replicate what you want to achive through the dashboard
2 years ago
but im curious now, i'd love to hear your use-case for this!
2 years ago
and that will allow the user to deploy databases on the fly?
The CMS is split into three pieces - Website that handles all the CRUD actions, UI layer (framework agnostic), CMS library that handles all the content management.
2 years ago
i should probably tell you that theres a 10 volume limit on the hobby plan, meaning you are limited to 10 databases per project, assuming databases are the only services with volumes in this senario
Yea, database will be the only volume needed. Will need to bump to Pro/Enterprise when I have a MVP likely
2 years ago
i dont know the volume limit per project on pro, its more than 10 though
2 years ago
and if you go beyond the pro plan you can get your limits bumped to anything you'd need
2 years ago
yep! railway can scale with you!
2 years ago
happy to hear that 🙂