Folder doesn't exist in deployment
I'v created a .certs folder with
railway run ...
, which was created sucessfully. I've also checked it with railway run ls
.
However, my app throws an error that this folder doesn't exist.
It looks like the final deployment doesnt copy the folder i created with railway run
. Is there anyway to do so?20 Replies
Project ID:
N/A
12eb9658-909f-4712-b675-9b33bb44d744
The
railway run ls .certs/
command outputs private.pem public.pem
.
But the deploy logs still say Private key not set. Make sure .certs/private.pem exists!
I think u are misunderstanding how
railway run
worksYeah possible hahaha
By "my app throws an error" are you saying locally or the one hosted on railway?
The one hosted on railway
Then u misunderstood how the command works
Oh... well
Tbh that's very common
Hmm, but still not sure how I could create that directory in my deployment
I mean I can't put the .certs/ dir out of my .gitignore
Well, looks like the enviroment variables support multiple lines, so I may just put the certs there
Railway handle certs automatically if ur talking about ssl certs
Nah its private and public key for my jwt's
how often do they change? (the certs)
basically never
put them onto a volume then
I've put them in a enviroment variable, works pretty well
or is that unsecure for some reason?
that is far from ideal, not because it's insecure, but simply because it's not how it should be done or what environment variables are used for
Hmm, yeah, I see
I guess I'll leave them there for now, the project is just an mvp right now, if people like it I'll change it
but thanks guys!
deploy this https://railway.app/template/Nan7Bs
upload the files
move the volume over to the correct service
profit