How to add Config files
justkira
PROOP

a year ago

I'm facing an issue while deploying NATS on Railway. The problem is that NATS can only be configured through nats.conf files, not environment variables, which means I’d need volume support. My question is: how can I add my nats.conf file? Do I need to create a custom Docker image for this, or is there a simpler way?

9 Replies

justkira
PROOP

a year ago

n/a


a year ago

custom dockerfile that copies your config files into the correct locations


justkira
PROOP

a year ago

FROM nats:latest

COPY ./nats.conf /etc/nats/nats.conf

CMD ["-c", "/etc/nats/nats.conf"]

something like that that correct


a year ago

exactly


justkira
PROOP

a year ago

thanks i guess this issue is resolved


a year ago

no problem!


a year ago

!s


Status changed to Solved brody about 1 year ago


cmaccarone
PRO

a year ago

How do you do this without uploading the config files to your repo? I want to keep them secure? is there a way to ssh into the volume or something? @brody


Status changed to Open Railway 11 months ago


cmaccarone

How do you do this without uploading the config files to your repo? I want to keep them secure? is there a way to ssh into the volume or something? @brody

a year ago

Yes you could use railway ssh to place files into the volume, just open nano and paste the contents of the file in.


Loading...