Mount Multiple Destinations to the Same Source (Volume)

As the title says how do I mount a single volume to “multiple” destinations?

An example maybe?

Thanks :slight_smile:

1 Like

Ah. Unfortunately:

Volumes are bound to both apps and regions. A volume is directly associated with only one app and exists in only one region. No other app can see this volume and only an instance of the app running in the LHR region can access it.

Source:

However there is hope. You just would need to make/use a shared storage. Then both apps would access that. You could use an external service like S3, or for in-Fly, run your own (kind of) with Minio. Take a look at:

No. I want to mount different directories single volume to two different folders of the same app.

For example, If I have a volume named “persistent_volume”, I want to mount persistent_volume/files directory to some directory inside the app. Is that possible?

1 Like

Er, well the destination is the folder it appears at to the app. See:

e.g

[mounts]
source="myapp_data"
destination="/data"

So … the app would get a /data folder. One folder. You could make two sub-folders within that.

I haven’t seen any example of using two destinations. So I can’t say that’s not possible. No idea. Maybe someone else has.

Hey guys!

I’ve tried creating a new folder within /data, and it works fine. :ok_hand:

In my case, I did it to store the I18n translations .yml files. Because I dynamically update these files from the app itself, so I need to keep these files between deploys.

Fortunatelly these files weigh too little, but in case of need we can always increase (but never decrease :sweat_smile:) the size of the volume. :smiley: