a year ago
I am working on a FOSS project, and want to add a easy way for others to deploy to railway, I thought that was what railway.json was for. I set it up and I it works for one thing, but I recently also added Redis for caching. I am struggling to find any documentation for deploying multiple componets with railway.json? Is their a way I can make this one click deployment? Or will they have to deploy and configure Redis manually?
26 Replies
a year ago
N/A
a year ago
Also, I have a .env.example, that railway auto uses which is great, but that was mostly meant for local deployment, can I override it with a specific one for railway?
a year ago
If I get your question right, what you are looking for is creating a Railway template: https://docs.railway.com/guides/create
a year ago
Ok, this looks really good! Can I attach a repo to it though?
a year ago
Yes, this should be possible.
a year ago
Also, unrelated, but can I append ?referralCode=CODE to any railway link and it will work? Or does it have to be spesific?
a year ago
This is a good question, unfortunately I personally have no idea
a year ago
@uxuz I used the "Convert a Project Into a Template" but it didn't keep my env vars? How can I change them? it doesn't seem to let me?

a year ago
NVM
a year ago
im dumb
a year ago
3 dots > edit
a year ago
@uxuz WHY IS IT NOT PRIVATE BY DEFAULT?! How I private it?
a year ago
Hey, I am going to bed now, so you will have to wait for others to help you.
Note that your template will not be available on the template marketplace, nor will be eligible for a kickback, until you publish it.
a year ago
But anyone with the URL can access it rn!
a year ago
Also, I can't seem to get the Redis data to show up, I copied the env vars from my project, and just changed the password, but it loads forever on the Data page… Did I do somthing wrong>
a year ago
No one has the URL, unless you have shared it yourself or you have published it.
a year ago
What do you mean with copying your env vars from your project?
a year ago
Like when setting up the template, it made all them empty, so I filled in the ones I had on my project.
a year ago
Oh, I see what you mean. Please delete the old Redis database and create a new Redis database in the template. This way, the user that deploys your template doesn't need to configure anything. I have attached two screenshots, the first showing the new Redis database and the second one showing the old Redis database that originated from generating the template from an existing project.


a year ago
Regarding the referral link, since you are going to create a template anyway, it is possible to add it to the template link, as it is also endorsed in the modal for sharing your template.

a year ago
Yea, I saw.
a year ago
That worked! Don't know why I didn't think of that, thank u!
a year ago
You are welcome!
a year ago
Hey @yodaluca23, do you need any more help or can I safely close and mark this thread as solved?
a year ago
Yea, it can close, thank you!
a year ago
!s
Status changed to Solved uxuz • 12 months ago