Skip to content

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

Open
@4oijq342

Description

@4oijq342

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions