How I can get started using railway to host a website, discord bot, and a roblox bot

I'm pretty new to programming and very new to railway. I was just curious how I would get started using railway and what tools/frameworks I should use. Any help is appreciated 🙏 Note: I'm using MongoDB, hosting it from their website, how would I link it to my railway service/project?
17 Replies
Percy
Percy3d ago
Project ID: N/A
Medim
Medim3d ago
It all depends on the frameworks you're using, but you can always just link your gh repo (if you are using a gh repo) and see how the build goes or opt to a Dockerfile, to link your MongoDB you can do so through env vars, MongoDB probably gave you the DB url, username, pass, etc... You can also host your own MongoDB on railway if needed. You can always base yourself off already existing templates in https://railway.app/templates Also you can guide yourself through the docs https://docs.railway.app/overview/the-basics Railway uses Nixpacks, so if you link a project without a dockerfile it will try recognizing what you're building and build a dockerfile for you (for railway to use)
Wizulous
Wizulous3d ago
I'll try linking it through the gh repo. Also what's a build and a dockerfile? (And env vars?) You kinda lost me there 😅
Medim
Medim3d ago
Hmm.. Build is basically the process of converting your project's source code into a runnable application And "Dockerfile" is a text file that contains a series of instructions on how to build a Docker image (which is your application but on "containers/boxes") It serves to "package" your application for easy distribution across systems It's a bit of a "devops", you don't necessarily need to know about Docker but it helps. (I mean.. I guess one of railway's strongest points is you not needing to dwelve into devops that much)
Wizulous
Wizulous3d ago
@Medim Thank you sm man. Yeah, I'm very confused on the Docker/Build stuff, but I'll learn
Medim
Medim3d ago
Np, u can comment on this thread or @me if u got any more questions
Wizulous
Wizulous3d ago
@Medim sorry for the ping. Quick question: Say I have multiple "groups" that I own in need of a bot/website, should I place the under the same project as they all need to connect to each other. But, if more users use this, will my project be charge a lot more than if I were to split it up? Or would splitting it up be a waste of time?
Medim
Medim3d ago
Hmm for easier management I would place them under different projects You can still link them up, and also makes it easier to differentiate the billings
Wizulous
Wizulous2d ago
ight, I was just thinking about having the website be it's own project, the discord bot, and the other bot. 3 projects cheaper and might be easier to manage
Medim
Medim2d ago
About it being easier to manage sure, but about it being cheaper i don't think so since railway is based on usage You can also put then on one project and arrange them in groups
Wizulous
Wizulous2d ago
what is groups? I thought railway works like: You have the hobby plan, so each project you create will have $5 usage monthly
Wizulous
Wizulous2d ago
So would all of these add up for a total?
No description
Medim
Medim2d ago
Yes
Wizulous
Wizulous2d ago
0_0
Adam
Adam2d ago
that’s not how this works. You pay a subscription fee of 5$ a month +(your project usage-5$) if your project usage is under 5$, then you are just charged the flat subscription fee
Wizulous
Wizulous2d ago
Oh alr, is there anyway to keep my usage down?
Brody
Brody2d ago
write good / efficient code, dont run development servers