How to add Config files
justkira
PROOP

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

Closed

9 Replies

justkira
PROOP

2 years ago

n/a


2 years ago

custom dockerfile that copies your config files into the correct locations


justkira
PROOP

2 years ago

FROM nats:latest

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

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

something like that that correct


2 years ago

exactly


justkira
PROOP

2 years ago

thanks i guess this issue is resolved


2 years ago

no problem!


2 years ago

!s


Status changed to Solved brody • over 1 year ago


cmaccarone
PRO

2 years 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 • over 1 year 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

2 years ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...