Skip to content

Conversation

@claudiu-cristea
Copy link

Problem

I have this case: I need to make container's /data dir a persistent/named volume in order to persist Virtuoso storage. For performance reasons I don't want to mount this dir in the host machine. I'm using this setup in docker-compose.yml:

services:
  virtuoso:
    ...
    volumes:
      - source: virtuoso
        target: /data
        type: volume
        volume:
          nocopy: true
...
volumes:
  # Persistent Docker volume for Virtuoso data.
  virtuoso:
    name: virtuoso

But the container's /data/backups directory I want to mount on the host machine. Unfortunately, I this doesn't work:

    volumes:
      - source: virtuoso
        target: /data
        type: volume
        volume:
          nocopy: true
      - ./.backups:/data/backups

See https://stackoverflow.com/questions/52137210/how-to-share-sub-folders-from-a-docker-named-volume why...

Proposal

Allow to configure the backups directory via an environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant