Skip to content

Usage with DB data in a volume? #54

Answered by spwoodcock
jpbaril asked this question in Q&A
Discussion options

You must be logged in to vote

Using the docker volume directory for bind mounts is not advised, as it could cause permission issues or even corruption.

But yes you are right, if the docker volume is already created you should reference the volume like this:

volumes:
  db-data-volume:
    external: true
    name: the-name-of-the-existing-volume
services:
  upgrade:
    volumes:
      - db-data-volume:/var/lib/postgresql/data

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@jpbaril
Comment options

@justinclift
Comment options

@jpbaril
Comment options

@justinclift
Comment options

@jpbaril
Comment options

Comment options

You must be logged in to vote
2 replies
@jpbaril
Comment options

@spwoodcock
Comment options

Answer selected by jpbaril
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants