Is it possible to use two different named volumes for one app?
I want to create one volume for sqlite database and one for uploaded files but couldn’t find how to configure this on toml file
Currently I have this for sqlite db
[mounts]
source = "data"
destination = "/data"
I want to add another volume for file upload, something like this:
The current suggestion (from that thread, if you click through) is to use one volume with multiple paths. I guess in your case, one path for your uploads and one for your database.
I came here with same warning to create multiple volume for an app. For me it is mysql.
There is no clear indication on the docs how to do such, but based on the thread, according to your guess, can you give me an example how one might set on path for uploads and another for db?
You can have multiple subfolders under the root mounted volume. That being said, running a db server and saving user uploads to the same machine doesn’t sound like a good idea. Use a managed database and S3/R2 for your storage.
As @khuezy points out, you probably shouldn’t. But for trying it out, it should just be a case of using sub-folders e.g /data/uploads and /data/db (assuming the volume is mounted at /data).