Error creating a template
I am trying to create a template (
-n9Md7
currently unpublished) based on this project (id: 462b54b8-a74e-4132-8c36-8530315ad71e) and faced a couple of issues:
- I expected that the variable bindings (DATABASE_PRIVATE_URL
-> ${{Postgres.DATABASE_PRIVATE_URL}}
and DATABASE_URL
to ${{Postgres.DATABASE_URL}}
to have been populated in the template. They weren't.
- I defined those bindings in the template manually. When I try to publish the template, I get "Missing variable details": "Please add description or default values for all variables".
Any ideas on fixing this?22 Replies
Project ID:
462b54b8-a74e-4132-8c36-8530315ad71e
when you create a template from a project the variable names are copied over, but not the variable values
instead of going through and setting those all up, fork the postgres template https://railway.app/button?code=postgres
then go back and edit it, change the template name, and then add your service to it
Thanks.
But how would I create bindings in my Exograph service to Postgres variables (binding by reference such as
${{Postgres.DATABASE_PRIVATE_URL}}
)?you already did, heres a completed template https://railway.app/template/eMpJru
and heres the forkable link https://railway.app/button?code=eMpJru
ive just embedded your
railway-template
into itThanks. I need to grok Railway's templating system. When I tried to deploy using your template, I got a repo conflict error.
I want to create a repository such as https://github.com/exograph/railway-template with a "Deploy to Railway" button. When someone visiting that repo clicks the button, they fork it into one of their repo and deploy that to Railway. Is the way I am approaching the right way to go?
GitHub
GitHub - exograph/railway-template: Railway template to deploy a si...
Railway template to deploy a simple Exograph server - GitHub - exograph/railway-template: Railway template to deploy a simple Exograph server
yes, that will clone the repo included in the template service into the users github account, but you cant have two repos with the same name so you are asked to change the name
I am not able to use this template to create a new project. I added the button for the template you provided to https://github.com/exograph/railway-template and tried a few ways.
Click "Deploy to Railway" and I get to the template page (as expected) and then either of the following:
- Click on "Deploy now". I get "Repo name collision".
- Click on "Config" for "railway-template" to specify a different repo name. I get "Ready to be deployed", but the "Deploy" button is disabled.
GitHub
GitHub - exograph/railway-template: Railway template to deploy a si...
Railway template to deploy a simple Exograph server - GitHub - exograph/railway-template: Railway template to deploy a simple Exograph server
Click on "Deploy now". I get "Repo name collision".yes, github doesnt allow you to have two repos with the same name
Click on "Config" for "railway-template" to specify a different repo name. I get "Ready to be deployed", but the "Deploy" button is disabled.screenshots please
you need to configure postgres
configure > save config
About the first, of course. However I imagined that the UI would prompt me to do a clone.
railway is not going to overwrite any existing repos
that would bring so many issues
Success!
Thank you so much for your (as always) prompt and precise help.
of course!
However, I am unsure if I would go with the template approach. The main draw was a "One click deploy"
someone who doesnt have a repo with the same name wont get that error
I see. I will try that.
you have the repo with the same name since you created the repo
There was an additional issue. The initial deployment failed. I will investigate more, but it seemed like the Postgres service wasn't ready in time for the Exograph service to use it. I needed to redeploy the Exograph service to make it succeed. I kind of expected this since no service dependency is expressed in the template, but it may confuse a newcomer.
use nc in the start command to ping the database on a loop and exit when it can ping it
thank you for the trains!!
You are welcome!