Deploying Shared Mono Repo confusion
So im either slow and or the documentation doesnt do a good job of describing whats going on and its very confusing to me. Im currently trying to setup my monorepo and the way I have my project setup is like so with the image ive attacheched. This would fall under a shared mono repo and Im trying to follow the docs and it says to run a custom start command like nom run start:backend but I dont understand what that means or how it works. The way my project currently works is I run npm run start for my frontend and npm run dev for my server so I assumed id just add 2 start commands but thats not the case?
Im extremely new when it comes to hosting and deploying so it feels a bit all over the place in trying to understand these things and it seems like the docs take you from one link to another very frequently rather than having everything you need on a page and its kinda overwhelming and hard to understand so any resource, docs, or explanation for setting something like this up would be very appreciated π
393 Replies
Project ID:
87f56f88-5de7-4a88-8ed9-9e3f3af4ea9f
87f56f88-5de7-4a88-8ed9-9e3f3af4ea9f
The way im somewhat understanding this is that you make 2 seperate services using the same monorepo but im guessing and i dont want to just be guessing
the documentation doesnt do a good job of describing whats going onit really doesnβt, the documentation on mono repos of any kind needs a lot of love, its absolutely not you.
The way im somewhat understanding this is that you make 2 seperate services using the same monorepo but im guessing and i dont want to just be guessingyou have guessed correctly, two services, from the same repo, and you would set the start commands (in the service settings) to the applicable command for what you want that service to run. only issues im seeing here is that your start script for the frontend starts a development server, this will have very poor performace and use quite a lot of resources. same with the dev script for the backend, you never want to use nodemon in production.
the whole reason i went back to using my mono repo was so i didnt have to do this π€¦ββοΈ
ive been working for weeks trying to get my project thats pretty much already done hosted and its been such a nightmare
two apps need two railway services
so just to clarify my ignorance...theres no such thing as a single full stack hosted service anywhere? or is that just in railways case?
there is, but your frontend and backend are two apps, even if they share types, so they need two services
currently I technically already have 2 services setup, my backend is on railway and front end on netlify...but ive been having a bunch of cors issues and a guy thats been helping me told me to use the mono repo I had before and setup a proxy so I dont have the issues that ive been having
yeah you still need two services for that, we can setup a proxy if thats what you would like
https://railway.app/project/35d8d571-4313-4049-9699-4e7db7f02a2f
yeah just give me a second cuz now I have to rethink and understand a bunch of stuff, imma check the link rq
theres really not much you need to do to get your mono repo deploying on railway, you are just starting dev servers, and not doing that is an easy fix
the link is what your project should look like (maybe minus a database)
(i have a template for the proxy)
Oh yeah no thats not the issue at all, its just I started trying to work in a way that allowed me to use a single service for this so I could use creact react apps proxy because the way i was previously working before was how you mentioned but the guy helping me just told me that having them split up like that makes everything harder which I could honestly verify because ive yet to get my sessions, cookies, and cors issues to work.
he suggested that its still possible on railway via docker config? π€
"if everything is in the same project (ie one git clone will give you everything you need) then you can do a multi-stage docker build that build your frontend and then pass that to the backend as static assets to be served as part of the api
and that approach will also make it easier to diagnose locally since you can run the build on your own computer and do a production build to make sure it works properly before handing it to railway"
yes you can have your backend serve the frontend, that is certainly one way, personally its not something i would do
yeah i mean im kinda out of options man π€·
so i kinda have to try something else
because doing it that way hasnt worked for me and I dont know why so doing this is at least progress towards something
three options
- two railway services
- two railway services + a proxy
- one service - serve the frontend from the backend
i wouldnt either tho
you pick, ill help with whatever you pick
alright so lets do this then
what option?
2.)
good choice
question tho
of course
does it have to be 2 railway apps specifically? because like i mentioned earlier I already have a bakcend service and my frontend is on railway so its still 2 services but one of them in netlify? does that matter for setting up the proxy?
lemme send the link
did you want to keep the frontend on netlify?
87f56f88-5de7-4a88-8ed9-9e3f3af4ea9f
it doesnt make a difference to me tbh but id maybe lean to keep it there because I wanna keep my cost down on railway id guess
if switching it makes things easier...then no
keeping it on netlify would have the reverse effect, since if kept on netlify you will be charged extra egress from the proxy communications to the off-site frontend
oh? so it would cost more not having it in railway...interesting. I always see that word egress but didnt know thats what it meant
in that case yeah i can have it on railway
it would also have far more latency
egress is the amount of data out of the network
interesting, guess that makes sense. I thought storage would have cost more but goes to show how little i know lol
im setting it up rn
the frontend doesn't use any charge-able storage on railway
you will need to make some changes to your repo though, because as mentioned before, you are running both the frontend and backend in development modes
we want to save money here not burn it
the less resources your services use, the cheaper they are to run
oh yeah you mentioned alot of stuff earlier about not using nodemon and whatnot
share or add me to your repo and I'll see what changes need to be made
sry if i didnt catch everything i was talking back and forth with someone
which one?
no worries
both?
you have a mono repo, it is only one repo? wdym both?
also this channel doesnt have vc?
nope, no VC needed
ahhh, my apologies. I keep confusing people with this so I essentially have 3 repos. one is the monorepo and the 2 other ones are a divide of that mono repo so my frontend and backend. What i currently have hosted is the 2 seperate repos not my mono repo. Should I start from scratch and just use that monorepo instead of the two?
yeah that's quite convoluted, you should remove those two repos designated backend and frontend
gotcha
then add me to the first repo, my gh username is brody192
unless it's public, in that case just send the link
added
looking
no worries, im looking over stuff to and trying to make it work again in local dev
dont get too dug in, theres a good chance theres some changes we need to make that might interfere with what you are doing
mmm yeah.... every since i hosted my stuff the singular thing thats given me a problem and even now in local dev is giivng me an issue is user authentications / sessions / cookies...im just at a loss on what to do in that regard.
well this repo is technically a monorepo, its mushed together, this makes both it hard to run both locally and on railway
I thought that was supposed to make things easier?
i can't see how this makes anything easier, there is a right and a wrong way to do a shared monorepo, and this is not what you want to do, we will get you fixed up though
ah thats what you meant. gotcha
ill try my hand at a pr to get this repo in shape
sounds good. thank you π
I gtg to work but ill be back and go over the changes. oddly enough my local dev sessions arent saving either which is the same problemI had when i had it hosted so in a way this could be a good thing or a hint since again its most likely configs
sounds good
if theres any repos or documentation you follow or suggest for how to properly set a monorepo up rather than slapping them all in the root directory like I did lmk to π
I just googled how to setup a npm workspace haha
did you see my branch?
ah, yeah i see it now
was it this? https://docs.npmjs.com/cli/v7/using-npm/workspaces
workspaces | npm Docs
Working with workspaces
yep thats it
okay so do you wanna walk through how to deploy my branch?
I think I should quickly look over how all this works rq first, when I finish reading this and going over it ill lyk
sounds good
side note, I tried to separate the two apps best I could, but it's likely that I left bits and pieces of them in either folder, so when you have the time go through and clean that up
Yeah i was assuming that too, still thanks 1000X
might have some quick questions as I read
of course
for example the
is just return an array of both folder paths? so its essentially a shorter version of?
im assuming the * just means return all files
correct, there may be a time when you don't want every folder in the packages directory to be a workspace, but we currently do, so a wildcard is easiest
ah wait i just read more oops lol they tell you that down below. Ok yeah this makes sense. The only thing im noticing that im not seeing is this? what are these?
"start": "caddy run", ?
railway specific files and scripts?
https://caddyserver.com/
railway does not run a frontend like netlify or vercel, it will run your app as is, and use the default start script, the default start script starts a development server, so that is what railway would run, so we need to provide a custom build plan to download caddy and run it.
nixpacks.toml installs caddy
the Caddyfile is the config for caddy
and the start command runs caddy
wow
how in the world do you know this π
this isn't my first rodeo
clearly lol must have been a headache, I just assumed that it would handle it or at the very least recognize that and make a custom build command but i would have never guessed having to manually do this yourself
nope railway is not like that, your code is ran as is, and if it's only setup to run a development server, than that's what will be ran
hmm I think I understand, so netlfy and vercel essentially make it for you but like you said railway makes it as is, so why isnt my backend caddy server.js for example? because node is setting up a backend server therefor node for backend is what caddy is for the front end on build/run commands?
you can think of caddy as a file server, nothing to do with node. its simply serving the built website files
definitely will do more research on it but I think i get the jist
imma test out the repo rn
locally?
ye
okay cool, there is a procedure to deploy onto railway, so let me know when you wanna do that
sounds good thank you π
just attempted running it and I think the root package.json file needs a start script
nope
npm run frontend:dev
and
npm run backend:dev
ahhhh i was doing :start mb
hmmm
yeah thats weird i get the same error
when i used :start it said the same thing
please see the commands i have sent here
yeah those are what I put
copy and pasted and everything
I meant i get the same error except instead of start its combplaining about the dev
did you change anything? it works for me
nope, do i need to npm init maybe?
nope, it just works for me, show me your package.json from your backend
can you run start
you are running that command from the root right?
yep, you can see the command and the directory in the sc, i tried both start and dev and get that error
lemme try something
tried npm installing to make sure and restarded and yep i still get them,
I doubt it was the way I fetched the branch
might be this
Stack Overflow
error: This is probably not a problem with npm. There is likely add...
In my project, I'm using Angular6 for the frontend. Now what I'm trying to do is deploy my project which is in remote server into the actual server. I'm using npm run build -prod command to build the
imma see if i can figure it out but i think its most likely something do do with this
it still works for me locally, something is misconfigured on your end, try deleting and redownloading the branch
only other solution im seeing is to delete my node modules and resinstall
cant hurt to try
π i dont lol
lmao
just noticed something different but could you screen shot what your root directory looks like
this is mine now
what version of node are you using
ok thats what I thought. Yeah for some reason I had a nodemodules folder in my root, but now mine looks like that and i have one module folder in the frontend and backend folders....still getting that error though π , and the error doesnt give much context
I looked in here too
have you tried this?
yep
even vscode is asking me wtf im doing
i saw that too
just so we are on the same page....git checkout -t origin/branch-name is what im doing for that branch?
i might just make a completely seperate local repo and clonse it just to make sure
i dont know, i dont use git cli
imma bout to fight my computer lol, lemme try cloning on a clean repo
nvm thats not a thing you can do in git
yeah no you can only clone from the master branch and get the branches through it
what node verison are you using
i was actually about to ask the same thing earlier. 14.17.0
im like 99% sure this is a node issue
im on 18 lts
14 is far too old, please update
aight lemme try that
its 18.0.0 right?
nvm i got it v18.19.1
oh my god
it didnt work...but I ogt a different error
i should just need to install
or maybe i left it out of the backend's package.json by accident
yeah its not there lol
let me add it
dont add it to the package.json at the root
yeah i know, in the backend and front o nes
there was 1 or 2 missing in the frontend too but i just copy and pasted it in and npm i should work
lets see your package.json in the root please
I think it should be working now I just need to fix some file paths
i should have asked for your node version earlier π why that solved it is beyond me
node 14 too old
they say if it aint old dont fix it....they lied
i dont think thats quite how the saying goes
old, broken, tomatoe tomatoe π
gonna take like another 2 minutes prob to fix these files cuzz i remember having to fix them when i split up my repos like this
hmmm... question..I need 2 env files in each of these instead of in my root directory dont i?
what are the env files for
variables like so
then yeah
aaaaand theres a node_modules folder in my root again for some reason....I think its being carried over from my master branch?
WHALAAA
i dont think its a problem tbh
i spoke too soon
backend is good tho
whats wrong with the frontend
frontend node modules
lemme check something
seems like a package issues thats now broken of course. gotta get rdy for work but repo wise its working. After i resolve that and whatever comes up ill lyk when its rdy for deploy. Thanks again fam, not many people will take the time to do this and im learning alot π
happy to help!
gonna fix a few things then I should be good for deploy
Looks like everythings fine, only error im getting right now is this whenever I go to my landing page
other than that it should be good to deploy. im gonna push the changes
haha well what's going on with the manifest?
from what ive searched up it might have something to do with the index.html file...but again its only for the / landing page
* link tag
well see what the manifest response contains
easy enough to find out what's going on
opened up the project to get the error and all the sudden its not showing me that error anywhere when i didnt change anything....
problem solved
lol right
i pushed it to the master branch
deploy to railway time?
ye
show me your current railway project please
assuming we following the isolated one?https://docs.railway.app/guides/monorepo
nope
i got none
deleted them all accept the database
okay add a new empty service
after every step please send a screenshot so we stay on the correct track
this is going to be your backend, so give it an applicable name
boring, use capital case and spaces like your database name has
π doesnt it get converted to lowercase? maybe thats the domain lol
yeah that's for the domain, add a space on either side of the dash, make the name look presentable
okay now we talking
now hit deploy, then generate a domain
now do all the same, but make a frontend service
now what variables does your backend need?
like 14, just add them now?
1 of the env i need is a frontend url tho which we havent made
the frontend should have a domain by now
oh wait u right
aight lemme add them then
for
FRONTEND_URL
you would want to use https://${{AquaPrime - Frontend.RAILWAY_PUBLIC_DOMAIN}}
same idea for all the database related variableswould this work?
https://aquaprime-frontend.up.railway.app/
use the reference variable i provided please
make sure you use the same syntax for your database variables
mm yeah i see now, imma have to change my code, for some reason I have it to this
and the one provided has no dashes
that doesnt matter, you can set your own variable name
you dont need to change anything in code
also, you would likely want to do a
REACT_APP_BACKEND_URL
in the same way on your frontend so you can use it in codeoooh i see what you mean ok
when you're done setting up the variables, show me (hide things that are sensitive though)
just making sure thats right ^
yeah looks good to me, after you deploy the changes you would be able to check if they render properly with the given eye icon
so when you do finish adding the variables, deploy and then check them with the eye icon
alright
i have one weird one but ill sc only got like 3 more
what service are you setting that variable on
which is needed for this
its for the oauth
google oauth*
so its a redirect url after authenticating
what service are you setting that variable on
you mean on railway? my backend one
if you are referencing a variable from the same service you are setting it on you dont need the service name
ah
got them both done
all variables are done?
yep
frontend only needed the backend url
we will be deploying the backend code first
on the backend service set the start command to
npm run backend:start
attach your repo
then i think thats all, you can then deploy
same process for frontend im guessing?
finishing the backend build first
for the frontend you would need to set
npm run frontend:build
for the build command and npm run frontend:start
for the start command, but lets make sure the backend is operational firststill waiting, its chonky
alright
finished, technically didnt fail but alot of errors, I know how to fix a few of them by uncommenting some code
I dont think ive seen these errors before tho
rebuilding the the code i had commented out in now
also I lied it actually did crash on the first build
for this error, in the backend's package.json, set the start script to
sleep 3 && node server.js
got rid of my other errors, gonna try that now
building now
also...wtf is that sorcery? its like a timeout before running the start script?
yeah?
howd you think of having to do that? something the error said? race condition? π€
dns not ready
what exaclty is this side of development considered? backend? devops? Feels like a whole new realm the moment i put my foot into hosting more complicated sites
i have no clue π
got the same errors back
does your database have a tcp proxy?
dont even know what that is so ill just say no
not that i know of
actually?
isnt this the same error from yesterday
hold on
well no is a bad answer
we want a tcp proxy in this case
oddly eary to this problem we had yesterday I feel like
oh?
check if your database has a tcp proxy please
is it this?
oh wait
i think i know something that might be ruining this too
wdym?
this
forgot to change it
should be
not sure if that fixes this specific problem but ik it will causes a problem regardless.
building
if it fixes it then i could maybe remove that sleep 3 later
maybe
8+ minute build
k so still failed but i think i see the problem one sec
likely because we are installing frontend packages as well as backend packages when deploying the backend
oh really? thought it would just do the backend ones since we are only using our custom start command, or does it run all the commands from the root package.json? π€
also rebuilding so lets see if its fixed in like 4 minutes
it runs
npm ci
at the root, meaning it installs everything from both packages, nothing to do the start commandgotcha
we can fix that
hmmm
odd
still get the same error, i went back and lookated the the database environments and the host was weird but i fixed it because i saw a host error but yea still
wait
i think i see more
what did you fix, there should be no need to fix anything as long as you are using reference variables properly
it was the db host, had an extra }
so im seeing this in there
so its connecting to the database but for some reason its having an issue with sequalize syncing
gonna try somethings, if you got any ideas feel free to shoot
i do, but let put a pin in that issue for the moment. lets get the separate install commands working
sounds good
https://github.com/JahnoelRondon/paragon-app/pull/4
your backend will now need a
NIXPACKS_CONFIG_FILE
variable set to packages/backend/nixpacks.toml
set this before you merge the prah thats for those omit dev errors
no, its so the backend deployment only installs the backend packages
aight lemme merge it
have you set that variable?
not yet, do that first?
set this before you merge the pr
no process.env needed?
this is a service variable
what would
process.env
be used for?didnt know if it was something that woudl be used in development but I guess its hosting specific
finishing build
show me the build table at the top of the build logs please
this?
looks like it worked as for as the command goes
yeah looks good, the new install command is working, are builds faster?
oh yeah, only took like 2 -3 minutes instead of 8 this time
nice
got alot of more errors i think though lol
missing some packages prob
possible that it ran faster because it through out an error faster not sure, but now the connected to database log isnt even there, omit still there and a new uuid import error is there
oh wait
yeah, cuz i pulled
lemme fix them
add uuid to your packages
also, dotenv can be moved to dev packages
this right?
yes lol
listen you gotta explain to me like a 4 year old if u havent noticed by now just making sure π
alright, fixing a few here and redeploying
uncommented my function when syncing sequalize as well to make things cleared, should be a minute
hmmm, yeah im 99% sure this is a sequalize issue
omg
π€¦ββοΈ
may have fixed it
dont ask π
if it keeps crashing imma do more digging myself then get back to u im just waiting now
@Brody fixed it
only error i get is
npm WARN config production Use
--omit=dev
instead.we don't need to worry about that, please ignore
so does the backend work? open the domain!
i mean technically i get this but its supposed to be like that because i dont use a root route but yeah no it works
made all my tables and assosioations as well
that's awesome, test it with postman? or similar? or do you just wanna deploy your frontend now?
lemme use postman rq
is your frontend code setup to use that react app backend url variable?
yep
for the api urls
for everything?
perfect
see this isn't too hard as long as you have your project structured correctly
never even knew there was a right or wrong way lol
also that recent pr you made wasnt mandatory right it was just to make builds faster right?
gonna seet my data really quick
no not strictly needed, just needed so dependencies aren't cross installed
still have to study them wepackages and using caddy
you've opened the Caddyfile right?
yeah but if you ask me i wont remember a thing i kinda glossed over it
aight rdy to setup frontend
well you can always look back, it's in plain English and fully self documenting
on the frontend you will need a variable
NIXPACKS_CONFIG_FILE
set to packages/frontend/nixpacks.toml
your build command will be npm run frontend:build
and your start command will be npm run frontend:start
and connect my repo or just deploy first?
yeah you can connect your repo too and then deploy all the changes in one go
unless im forgetting something, but i guess we shall find that out
deploying
i need to save our convo somehow by the time this is done, taking notes like sanat clause
its not going anywhere
also i just realized but when i update the repo both of them will redeploy
yeah you can use watchpaths for that
like in their respective nixpacks? quickly glossing over it while i fix deploy issues
in the service settings
ah
no clue tbh, ive never used that feature, you will have to play around
yeah ill give it a go afterwards
alright
something we missed in settings maybe?
why do you say that?
guessing tbh
saying things arent disabled
are disabled *
we dont want caddy to do https, railway handles that
admin endopoint is also useless
ah so these arent a concern
domain is working
soab
its back
the manifest, lemme check it
send link?
also i have to change some settings in my google cloud console since its in production now one sec
React App
Web site created using create-react-app
alright
i got the manifest error, but then i did a hard refresh and the error went away
yeah same, idk what thats about
blame cache
doesnt seem to break anything
deploy is fine but still having some issues that imma see if I can refix rq
resetting client secrets and a bunch of other stuff so this will take a while
Alright so I gave it like half a day in terms of hours to make sure, as far as deploying goes Im 99% sure its fine...but now im back to square one with my original problem with sessions.
when i check the database sessions are being made
from this code
however I feel like im missing something. This is essentially the catalyst of my problem. This is kind of where i was when I initially started and had my repos split up before we started
definitely feel like im missing something but ive just followed as much of the docs as i could as well as research on cookie / sessions settings to make this work. :bladerunner:
actually now that I think about it this is the part where everyone was telling me to setup a proxy to resolve this issue and I think we havent set that up yet π€
switched to a dev environment where i commented these out for local host and it works
found this post. I feel like this can be done without a proxy and its just a matter of me missing pieces to this puzzle, Ive had a feeling like I should be able to send a cookie to the browser manually when creating or retreiving a user but idk
Stack Overflow
Express-session is not setting cookies in browser
So I'm using express-session package to set cookie and session. It's also connected to my MongoDB store to store session. When user logs in, session gets stored in database just fine but there's no
you have to remember that your app sits behind a proxy on railway, your app runs in http mode, so it doesn't like setting secure cookies when running in http mode, you want to find a way to let it know that it's indeed being accessed from https, this is usually done by trusting the proxy headers that railway sets
in this case, specifically the
X-Forwarded-Proto
that railway sets to https
so its railways proxy thats blocking the cookies not my code?
no no it's not blocking anything, I'm not sure how you came to that conclusion
well if the proxy wasnt there then it would just be normal https no? which is why it works on local host and not railway because of the proxy? π€
so I have to set X-Forwarded-Protocol: https in the headers? π€
no, and no
this is where my lack of proxy knowledge is showing
no proxy knowledge needed, railway sets that header for you, you just need to trust it's value
you are trying to set secure cookies.
your app will not set the secure cookies when it thinks it's being accessed over http.
trust the
X-Forwarded-Proto
header that's set to https
.
now your app thinks it's being accessed over https.
now you can set secure cookies.aaah ok, that makes a bit more sense now. I just assumed it would be https autamtically because its a hosted domain
it is https externally, but express doesn't know that unless it trusts the header
express has a really nice guide https://expressjs.com/en/guide/behind-proxies.html
mmmm ok, it kinda reminds me of cors how you have to specify the domain but in this case you specify that its https and from where π€
not quite
is the proxy service specific?
wdym?
like would it be from the frontend service or backend service? or is there a universal proxy for railway that everyone uses?
every service that's accessed externally will use a proxy
your frontend already handles this, look into the Caddyfile and there's a line about trusting the proxy
though that is strictly only so you get the correct client IP in the logs, nothing more
doing some reading rq
just look at the link I sent
yeah thats what im trying to understand π . the main takeaways im understanding is that it changes/adds onto the request about details from the external service?
from the actual request the client made, yes
so in that case then what? after setting that up which im kinda now understanding is for any external thing we just do conditionals in our code checking if its railway?
maybe this will give you a good visual? https://utilities.up.railway.app/raw
this endpoint echoes back all the http headers that the app sees during a request
why do you need code to check if it's Railway, trust the proxy and then set your secure cookies and job done (hopefully)
I think you're over complicating and over thinking this
probably π , mind is trying to make sense of what looks like gibberish rn.
i guess the one thing thats a bit confusing to me is this code even after reading the docs but might just take some time and doing rathern than reading
lemme set that up
it trusts the headers the proxy sets, but it only trusts the headers if they where set by a local IP address
imma stick with that explanation and read more after π , trust me you're explaining it perfectly its just gonna take me a second. its building rn so lets cross fingers π€
I think thats the money emoji lol
close enough
question while this builds but, is this the norm with most services when hosting? that they sit behind a proxy of that service? liek if i was using vercel or fly.io they would sit behind one or is that just something you have to do your research on?
asking because i would have never gotten this on my own and idk if its common knowledge
yes every similar service would use a proxy, without a proxy there would be no way for the platform to route incoming traffic to the correct deployment
for some reason there seems to be liek this limited amount of resources for this ive felt like but maybe thats just me, any answer id look up would just talk about cookie configs or sessions but never proxies
ok that makes everything 100% more clearer thanks π
express is just being picky
picky, but makes sense
you dont understand when i say....ive spent weeks just trying to see this π
deployment is easy once you have your code in order and understand how the platform works
bru hand thats the part that scares me, you really have to invest in your hosting service like no other and railway makes alot of things easy for you so imagine fly.io π . coming from using netlify for static sites and comparing it i didnt think this would be the beast that it is but you can correct me if im wrong but im asssuming this is like everything else (language, framework), but after you learn one well enough you kinda understand how to work with others. This is my first time rlly working with a hosting service like this. Definitely made it look easy though. I got so much studying and looking over after this, thanks a thousand man β€οΈ
unironically I think that adding that one line of code you showed me at the end might have solved my issue when I had it setup the way I did but the structure you showed me is invaluable too π
yeah railway definitely has more of a learning curve than something like netlify, but that's just because you can run so much more on railway, and that's in part why railway doesn't just figure it out for you, because the scope of what railway can host is far too broad
yeah thats why i always assumed π but after doing all this it makes sense because its made to be flexible
exactly, railway is flexible, that's why you need to provide a way for railway to properly host the frontend site, by getting it to install caddy and have caddy actually serve the built site files
im probably just gonna look and stare at this screen in aw for a few minutes. π , I have some questions about my sesson store but imma wait on that and make a seperate post cuz i wanna soak all this in.
but accidentally running a development server on railway is something that is incredibly common, and unfortunately if left unchecked would end up in a $5+ bill just for the frontend service
that's around 600mb of ram, and what's your frontend using? sub 20mb?
yeah thats another side of it too that I have to learn. Is there a doc or forum you follow that tells you things like this as far as cost effectiveness for hosting services? π€
more so about a rule of thumb, don't run development servers
but the alternatives are a case by case basis, and I only have experience with caddy
ah, makes sense.
caddy for website hosting is definitely the most user friendly, so it works quite well
I guess you can fiddle with some stuff to and track your usage
have you checked out the metrics service tabs?
nope lol I havent had a need to because ive had nothing in my project other than the database usually, am now tho
outbound?
yeah what about it?
shouldnt the network be inbound because the backends on railway? or am i reading that wrong :thonk:
stuff like that i guess imma have to learn to
network traffic goes both ways, in and out
gotcha
imma take a quick break and then start studying this and messing with the application. Im not a wiz yet but if you need to learn how to make a mean chicken stew im your guy π π
I like chicken