title: Docker: change folder where to store docker volumes
body: <p>On my <code>Ubuntu EC2</code> I host an application using docker containers. <code>db</code> data and <code>upload</code> data is being stored in volumes <code>CaseBook-data-db</code> and <code>CaseBook-data-uploads</code> which are being created with this commands:</p>
  
  <pre><code>docker volume create --name=CaseBook-data-db
  docker volume create --name=CaseBook-data-uploads
  </code></pre>
  
  <p>Volumes being attached through <code>docker-compose</code> file:</p>
  
  <pre><code>version: '2'
  services:
      mongo:
          container_name: "CaseBook-db"
          restart: always
          image: mongo:3.2.7
          ports:
              - "27017"
          volumes:
              - data_db:/data/db
          labels:
              - "ENVIRONMENT_TYPE=meteor"
  
      app:
          container_name: "CaseBook-app"
          restart: always
          image: "meteor/casebook"
          build: .
          depends_on:
              - mongo
          environment:
              - MONGO_URL=mongodb://mongo:27017/CaseBook
          ports:
              - "80:3000"
          volumes:
              - data_uploads:/Meteor-CaseBook-Container/.uploads
          labels:
              - "ENVIRONMENT_TYPE=meteor"
  volumes:
       data_db:
          external:
              name: CaseBook-data-db
       data_uploads:
          external:
              name: CaseBook-data-uploads
  </code></pre>
  
  <p>I need to store those docker volumes in different folder(for example <code>/home/ubuntu/data/</code>) of the host machine. How to change docker storage folder for volumes? Or there is a better way in doing this? Thank you in advance.</p>