Folder doesn't exist in deployment
Anonymous
TRIALOP

2 years ago

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?

25 Replies

Anonymous
TRIALOP

2 years ago

12eb9658-909f-4712-b675-9b33bb44d744


Anonymous
TRIALOP

2 years ago

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
MODERATOR

2 years ago

I think u are misunderstanding how railway run works


Anonymous
TRIALOP

2 years ago

Yeah possible hahaha


medim
MODERATOR

2 years ago

By "my app throws an error" are you saying locally or the one hosted on railway?


Anonymous
TRIALOP

2 years ago

The one hosted on railway


medim
MODERATOR

2 years ago

Then u misunderstood how the command works



Anonymous
TRIALOP

2 years ago

Oh… well


medim
MODERATOR

2 years ago

Tbh that's very common


Anonymous
TRIALOP

2 years ago

Hmm, but still not sure how I could create that directory in my deployment


Anonymous
TRIALOP

2 years ago

I mean I can't put the .certs/ dir out of my .gitignore


Anonymous
TRIALOP

2 years ago

Well, looks like the enviroment variables support multiple lines, so I may just put the certs there


medim
MODERATOR

2 years ago

Railway handle certs automatically if ur talking about ssl certs


Anonymous
TRIALOP

2 years ago

Nah its private and public key for my jwt's


brody
EMPLOYEE

2 years ago

how often do they change? (the certs)


Anonymous
TRIALOP

2 years ago

basically never


brody
EMPLOYEE

2 years ago

put them onto a volume then


Anonymous
TRIALOP

2 years ago

I've put them in a enviroment variable, works pretty well


Anonymous
TRIALOP

2 years ago

or is that unsecure for some reason?


brody
EMPLOYEE

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


Anonymous
TRIALOP

2 years ago

Hmm, yeah, I see


Anonymous
TRIALOP

2 years ago

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


Anonymous
TRIALOP

2 years ago

but thanks guys!


brody
EMPLOYEE

2 years ago

deploy this
upload the files
move the volume over to the correct service
profit


Loading...