Skip to content

Easy option to have bind-mounts #103

@hertell

Description

@hertell

Hi,

I use only bind mounts in all of my docker setups, and it's always a hazzle to keep the docker-compose files up2date because of me changing the volume configs. I do this basically because i'm afraid of accidentally deleting important volumes.. :-D

What i do is i add this optional variable to all volume configs that does not break anything if it's not used

volumes:
  - "${MOUNTPATH:+${MOUNTPATH}/}mongodb_data:/data/db"
  - "${MOUNTPATH:+${MOUNTPATH}/}mongodb_config:/data/configdb"

Maybe this could be something to add to the docker-compose.yaml file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions