How To Put a File That Is Not On Source Control On a Railway Docker Application

Hello I have a question. I would like to know how I can add a file that is not in my GitHub source control to a Django application. Specifically, I want to add a custom settings file for production. Is there any procedure that I can take to make this happen? Thanks!
Solution:
yeah I think that's fine, just keep everything even remotely sensitive as environment variables
Jump to solution
9 Replies
Percy
Percy3mo ago
Project ID: N/A
ChrisHuppert
ChrisHuppert3mo ago
N/A
Brody
Brody3mo ago
without a native filebrowser I can't think of a straight forward way to do this
ChrisHuppert
ChrisHuppert3mo ago
Thank you @Brody for your response, I had looked into a file browser for railway but it is a template: https://railway.app/template/guiCBv. I am not sure if I would be able to attach that to my Django application that is pulled from GitHub
Brody
Brody3mo ago
yeah I know, I didn't mention it because that's fine if you wanna put something on a volume once and never touch it again but if you need to keep changing the file it's not going to be fun you would have to move the volumes around since you can only attach one volume to one single service at a time
ChrisHuppert
ChrisHuppert3mo ago
That makes sense. I suppose it would be rather inefficent to do this. In your opinion, would it make more sense to simply add my settings file to source control but ensure that I am using environment variables over potentially sensitive information? I know that some Django practices typically have a separate settings file for local development and one for production but perhaps doing it this way would be better for railway?
Solution
Brody
Brody3mo ago
yeah I think that's fine, just keep everything even remotely sensitive as environment variables
ChrisHuppert
ChrisHuppert3mo ago
Awesome thank you @Brody !
Brody
Brody3mo ago
no problem!