Deploying Postgres from GraphQL
aiab
HOBBYOP

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

aiab
HOBBYOP

2 years ago

N/A


aiab
HOBBYOP

2 years ago

It seems to not deploy the required environment variables, I might just be missing something from the query that sets these up

1219717842421682200


brody
EMPLOYEE

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


aiab
HOBBYOP

2 years ago

That sounds perfect , thanks Brody !


brody
EMPLOYEE

2 years ago

but im curious now, i'd love to hear your use-case for this!


aiab
HOBBYOP

2 years ago

Working on a CMS that I want to run on Railway haha


brody
EMPLOYEE

2 years ago

and that will allow the user to deploy databases on the fly?


aiab
HOBBYOP

2 years ago

Yea, so basically a service that helps agencies deploy their projects


aiab
HOBBYOP

2 years ago

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.


brody
EMPLOYEE

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


aiab
HOBBYOP

2 years ago

Yea, database will be the only volume needed. Will need to bump to Pro/Enterprise when I have a MVP likely


aiab
HOBBYOP

2 years ago

Does Pro have that same limit?


brody
EMPLOYEE

2 years ago

i dont know the volume limit per project on pro, its more than 10 though


brody
EMPLOYEE

2 years ago

and if you go beyond the pro plan you can get your limits bumped to anything you'd need


aiab
HOBBYOP

2 years ago

Ah, sick. Good to have that option


brody
EMPLOYEE

2 years ago

yep! railway can scale with you!


aiab
HOBBYOP

2 years ago

Nowhere else I'd rather build this my friend!


brody
EMPLOYEE

2 years ago

happy to hear that 🙂


Loading...