2 years 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
2 years ago
N/A
2 years 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?
2 years ago
If I get your question right, what you are looking for is creating a Railway template: https://docs.railway.com/guides/create
2 years ago
Ok, this looks really good! Can I attach a repo to it though?
2 years ago
Yes, this should be possible.
2 years ago
Also, unrelated, but can I append ?referralCode=CODE to any railway link and it will work? Or does it have to be spesific?
2 years ago
This is a good question, unfortunately I personally have no idea
2 years 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?

2 years ago
NVM
2 years ago
im dumb
2 years ago
3 dots > edit
2 years ago
@uxuz WHY IS IT NOT PRIVATE BY DEFAULT?! How I private it?
2 years 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.
2 years ago
But anyone with the URL can access it rn!
2 years 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>
2 years ago
No one has the URL, unless you have shared it yourself or you have published it.
2 years ago
What do you mean with copying your env vars from your project?
2 years ago
Like when setting up the template, it made all them empty, so I filled in the ones I had on my project.
2 years 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.


2 years 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.

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