Customize docker volume for "conf"?

Currently my docker compose config directs the seafile folder to a volume like so:

volumes:
      - /mnt/data1/seafile:/shared/seafile

This creates a folder with 4 directories in it:

image

I would like to separate the seafile-data folder from the others. It seems this is possible for logs by specifying a volume for /shared/logs, however it does not seem possible to do the same for conf and ccnet. Is that the case or is there a way to specify the location of those as well?

Hi, I tried this and it seems to work:

First, initialize with a single volume:

volumes:
  - ./shared:/shared

Then compose down, move the folders where you want and remap. As example, I moved conf and seafile-data next to the global shared folder.

volumes:
- ./shared:/shared
- ./seafile-data:/shared/seafile/seafile-data
- ./conf/:/shared/seafile/conf
1 Like

Thanks for the tip, it didn’t work for me however :man_shrugging:

What’s the issue?

The folders still get created at the /shared location rather than the /shared/seafile/conf location. To be specific, when I specify these volumes:

  • /mnt/seafile:/shared/seafile
  • /mnt/docker-data/seafile/conf/:/shared/seafile/conf
  • /mnt/docker-data/seafile/ccnet/:/shared/seafile/ccnet
  • /mnt/docker-data/seafile/logs/:/shared/logs

The conf and log folder still appear in /mnt/seafile rather than /mnt/docker-data.

Oh wait, it looks like I made a mistake in my first line… testing…

Still no go, I tried this:

volumes:
  - /mnt/docker-data/seafile:/shared  
  - /mnt/seafile:/shared/seafile/seafile-data

I want everything to be in /mnt/docker-data/seafile except for seafile-data to be in /mnt/seafile - what would I do?

This should work. Have you moved the content of seafile-data I mean with mv?

Note that seafile-data will still be in /mnt/docker-data/seafile, but should be empty.

Oh, if seafile-data is supposed to be there empty then maybe it did work, that was my test. Thank you then!

You’re welcome