2 years ago
i need to add a file.db to railway its a file not database cause i have a database and i need to have a permission to read from it and write to it using python
1 Replies
2 years ago
If you don't have a volume yet, you can add a volume to your project, a volume will help persist the files
However, to get the file in the volume, follow these steps in your project dashboard:
Right-click and click on
Templatesand deploy Brody's FileBrowser templateIn the deploy config, set the
USE_VOLUME_ROOTvariable to1Once it's deployed, delete the volume that's attached to it
Mount the volume you created ( or your current one ) to the FileBrowser service
Start the FileBrowser service, and go to its website, you can use the login credentials in the FileBrowser service settings
You'll now be able to upload and download files from the Volume, you'll want to upload the
file.dbfile into the volume.After you've uploaded the file, you can disconnect the volume and mount it back to your original service ( you may delete the filebrowser service now )
After completing this, you should now have a volume attached to your service containing the file.db file, which you should now be able to use in your app
One thing to keep in mind though is that volumes are mounted on the root of your container by default, if your file.db was originally located in your app root directory then you'll want to mount it to that directory on /app/DIRECTORY ( or alter your app to account for this )
Status changed to Solved Railway • about 2 years ago