R
Railway9mo ago
Paul

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
Percy
Percy9mo ago
Project ID: N/A
Paul
PaulOP9mo ago
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!
Medim
Medim9mo ago
I think u are misunderstanding how railway run works
Paul
PaulOP9mo ago
Yeah possible hahaha
Medim
Medim9mo ago
By "my app throws an error" are you saying locally or the one hosted on railway?
Paul
PaulOP9mo ago
The one hosted on railway
Medim
Medim9mo ago
Then u misunderstood how the command works
Paul
PaulOP9mo ago
Oh... well
Medim
Medim9mo ago
Tbh that's very common
Paul
PaulOP9mo ago
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
Medim
Medim9mo ago
Railway handle certs automatically if ur talking about ssl certs
Paul
PaulOP9mo ago
Nah its private and public key for my jwt's
Brody
Brody9mo ago
how often do they change? (the certs)
Paul
PaulOP9mo ago
basically never
Brody
Brody9mo ago
put them onto a volume then
Paul
PaulOP9mo ago
I've put them in a enviroment variable, works pretty well or is that unsecure for some reason?
Brody
Brody9mo ago
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
Paul
PaulOP9mo ago
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!
Brody
Brody9mo ago
deploy this https://railway.app/template/Nan7Bs upload the files move the volume over to the correct service profit
Want results from more Discord servers?
Add your server