5 months 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?
2 Replies
5 months ago
custom dockerfile that copies your config files into the correct locations
FROM nats:latest
COPY ./nats.conf /etc/nats/nats.conf
CMD ["-c", "/etc/nats/nats.conf"]
something like that that correct
5 months ago
exactly
5 months ago
no problem!
5 months ago
!s
Status changed to Solved brody • 5 months ago
5 months 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 • 5 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
4 months ago
Yes you could use railway ssh
to place files into the volume, just open nano and paste the contents of the file in.