How to attach multiple volumes for a service?
vishalkadam47
HOBBYOP

a year ago

i have a project where a service has multiple volumes but while creating a template i'm not able to attach more than one volume

    volumes:
      - "./addons:/addons"
      - "./storage:/storage"
      - "/etc/localtime:/etc/localtime:ro"
Solved

10 Replies

a year ago

you can only attach a single volume to a single service


vishalkadam47
HOBBYOP

a year ago

ohh


vishalkadam47
HOBBYOP

a year ago

and how do i configure if there are 2 paths (subfolders) but a single volume

    volumes:
      - ./config:/app/config
      - ./assets:/app/assets

a year ago

mount volume to /app/data and have the app store the files into /app/data/config and /app/data/assets


vishalkadam47
HOBBYOP

a year ago

so if I set a volume to /app/data how would the sub-folders will create

didn't get you about /app/data/config and /app/data/assets


a year ago

The volume is a folder mounted at /app/data. Any subfolders are also contained within that volume


a year ago

You can create those folders using a filebrowser template, or have your program create them on startup if they don’t already exist


vishalkadam47
HOBBYOP

a year ago

so you mean i can also have 2 services in one template, one for my app and one for filebrowser which i can use for creating subfolders


a year ago

If you're creating a template, you shouldn't need filebrowser. Your app should automatically create the subfolders it needs


a year ago

!s


Status changed to Solved adam over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...