hurlenko / filebrowser-docker

🐳 filebrowser inside Docker container
275 stars 28 forks source link

What is the correct volume declaration for docker compose? #32

Open 4oijq342 opened 1 year ago

4oijq342 commented 1 year ago

I have a bunch of config and data volumesthat I use for my containers. All of them hold configuration except the data volume, but they are all functionally identical.

If I use this format it results in duplicate directories being created by the filebrowser container under my data directory:

    volumes:
      - "config-bazarr:/srv/config-bazarr"
      - "config-delugevpn:/srv/config-delugevpn"
      - "config-emby:/srv/config-emby"
      - "config-filebrowser:/srv"
      - "config-lidarr:/srv/config-lidarr"
      - "config-pihole:/srv/config-pihole"
      - "config-prowlarr:/srv/config-prowlarr"
      - "config-radarr:/srv/config-radarr"
      - "config-readarr:/srv/config-readarr"
      - "config-sonarr:/srv/config-sonarr"
      - "data:/srv/data"

Whereas if I do not specify a volume for /srv, docker creates a volume (which is normal and expected). The weird thing is that it looks exactly like my code from above: docker-autocompose

    volumes:
      - "config-bazarr:/srv/config-bazarr"
      - "config-delugevpn:/srv/config-delugevpn"
      - "config-emby:/srv/config-emby"
      - "config-filebrowser:/srv"
      - "config-lidarr:/srv/config-lidarr"
      - "config-pihole:/srv/config-pihole"
      - "config-prowlarr:/srv/config-prowlarr"
      - "config-radarr:/srv/config-radarr"
      - "config-readarr:/srv/config-readarr"
      - "config-sonarr:/srv/config-sonarr"
      - "data:/srv/data"

What is the correct way to use docker compose and not have duplicate nested directories?

4oijq342 commented 1 year ago

closed in favor of https://github.com/filebrowser/filebrowser/issues/2523