Home > Net >  Using another volume with Storage API supabase
Using another volume with Storage API supabase

Time:10-02

I am Self hosting Supabase, I don't know much about servers or docker, and need a little assistance in using a different volume for storage. My hosting plan requires that upgrade CPU and MEM every time I need more space. They do however offer a resizable storage volume. I am not certain what : means.

The storage volume is mounted at /mnt/volume-ash-1#

Can I simply change the YML file to point to this volume?

      # FILE_STORAGE_BACKEND_PATH: /var/lib/storage
      FILE_STORAGE_BACKEND_PATH: /mnt/volume-ash-1#  <----change here?
      TENANT_ID: stub
      # TODO: https://github.com/supabase/storage-api/issues/55
      REGION: stub
      GLOBAL_S3_BUCKET: stub
    volumes:
      ## - ./volumes/storage:/var/lib/storage
     ./volumes/storage:/mnt/volume-ash-1# <---- change here?

Just wonder if this even possible, or what other solution I could do and continue using Supabase's Storage API?

CodePudding user response:

Yes, stop your container, copy the content of your ./volumes/storage to the /mnt/volume-ash-1 after that change to /mnt/volume-ash-1:/var/lib/storage and you are good to go. (The volume definition is: /host/path:/path/in/container)

And leave the FILE_STORAGE_BACKEND_PATH: /mnt/volume-ash-1 <----change here? FILE_STORAGE_BACKEND_PATH: /var/lib/storage as it was

It should look like this:

  FILE_STORAGE_BACKEND_PATH: /var/lib/storage
  TENANT_ID: stub
  # TODO: https://github.com/supabase/storage-api/issues/55
  REGION: stub
  GLOBAL_S3_BUCKET: stub
volumes:
  - /mnt/volume-ash-1:/var/lib/storage
  • Related