How to attach multiple volumes for a service?
vishalkadam47
PROOP

2 years 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

2 years ago

you can only attach a single volume to a single service


vishalkadam47
PROOP

2 years ago

ohh


vishalkadam47
PROOP

2 years ago

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

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

2 years ago

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


vishalkadam47
PROOP

2 years 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


2 years ago

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


2 years 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
PROOP

2 years 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


2 years ago

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


2 years ago

!s


Status changed to Solved adam • over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...