need help
fut
HOBBYOP

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

Solved

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:

  1. Right-click and click on Templates and deploy Brody's FileBrowser template

  2. In the deploy config, set the USE_VOLUME_ROOT variable to 1

  3. Once it's deployed, delete the volume that's attached to it

  4. Mount the volume you created ( or your current one ) to the FileBrowser service

  5. Start the FileBrowser service, and go to its website, you can use the login credentials in the FileBrowser service settings

  6. You'll now be able to upload and download files from the Volume, you'll want to upload the file.db file into the volume.

  7. 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


Loading...