a year ago
Hi folks,
Super new to railway, but enjoying it so far.
I have a dockerized application that I was able to stand up and get running. It is a docker image from Dockerhub and a postgresql database and that's it.
I then wanted to turn it into a template. I was able to do so. Here is the template: https://railway.com/template/a-dcE1?referralCode=yhUjLO
But when I want to publish it, I see an error message saying "Missing variable details". I have screenshot but don't seem to be able to post an image.
But these variables are all on the postgresql template. I'm not sure how to document or set good defaults for this. I would think that the postgresql variables would be whatever the railway service set them to (including things like the username/password and SSL cert days) but am unsure.
I looked in the forum and only found this: https://station.railway.com/questions/error-publishing-template-missing-varia-3fd2581f and this https://station.railway.com/questions/can-t-publish-template-e95a2bdc
which don't appear applicable.
I looked at the template doc: https://docs.railway.com/guides/publish-and-share but it doesn't cover this.
Any advice?
7 Replies
a year ago
Hey Dan,
First off, it's awesome that you want to publish a Template on the Marketplace.
Second, I do see the template showing up fine, but I am wondering if the error is somewhat extraneous... If you can find a way to show us that screenshot, we can try to address it.
Status changed to Awaiting User Response Railway • 11 months ago
angelo-railway
Hey Dan,First off, it's awesome that you want to publish a Template on the Marketplace. Second, I do see the template showing up fine, but I am wondering if the error is somewhat extraneous... If you can find a way to show us that screenshot, we can try to address it.
a year ago
Thanks for the reply! I don't know what I was missing previously, but here's a screenshot of the error message I get when I try to publish the template. It is in the lower right and says "missing variable details".
Attachments
Status changed to Awaiting Railway Response Railway • 11 months ago
a year ago
I already encountered this bug (https://discord.com/channels/713503345364697088/1350928741643063319/1350928741643063319).
I fixed it by going into 'Edit Template', removing the database, and adding a new one. If you used referenced variables to connect to it, you don't need to change anything else; otherwise, you should update your app's connection variables.
I think this happens when you create a template from a project that already has a database.
a year ago
Thanks @medim! I'll give that a try and report back.
a year ago
Hey mooreds, How did it go? Let us know and we can investigate more around this error.
Status changed to Awaiting User Response Railway • 11 months ago
10 months ago
@echohack it seemed to work but I couldn't specify a specific port to forward on the template, only http and tcp port forwarding. When I started a project from the template and then manually made the connection to the 9011 port, it works.
The template behavior was different than when I was standing up the project before it was a template. I was troubleshooting that and ran out of my free $5. I haven't had time to look at it since.
Status changed to Awaiting Railway Response Railway • 11 months ago
10 months ago
Hello,
This behaviour is by design, as to not accidently leak any variables you may have in your own project, such as API keys or Database passwords, all variables are left blank when generating a template from a project.
Medim outlined the solution above, edit the template after the fact, remove any databases and replace them with a new database from within the template composer, and of course always use reference variables.
Best,
Brody
Status changed to Awaiting User Response Railway • 11 months ago
Status changed to Solved brody • 11 months ago