title: Docker Machine + Docker Compose + Volumes on Ubuntu
body: <p>So i have beeen using docker-compose in development for a while now on my Ubuntu 14.04 LTS host machine with a local VirtualBox provider (boot2docker inside it). </p>
  
  <p>Only recently i decided to try out docker-machine (because of the integration with Pycharm) but i am running into some issues like for example when i save some new code the docker container is not updated automatically anymore and i think its because i commented out my volumes in my <code>docker-compose.yml</code> web service but if i don't i will get a <code>manage.py not found</code> error so i understood in this <a href="https://stackoverflow.com/a/31567743/977622">here</a> that i should comment it instead.</p>
  
  <p>I have been reading lots of things on the internet and i would like to know if there is a good and simple approach to get docker-machine playing nicely with docker-compose on Ubuntu.</p>
  
  <p>DockerFile</p>
  
  <pre><code>FROM ubuntu:14.04.3
  ENV PYTHONUNBUFFERED 1
  RUN apt-get update &amp;&amp; apt-get install -y \
    build-essential \
    git-core \
    python2.7 \
    python-pip \
    python-dev \
    libpq-dev \
    postgresql-client-9.3 \
    libjpeg-dev \
    binutils \
    libproj-dev \
    gdal-bin
  RUN mkdir /vagrant
  WORKDIR /vagrant
  RUN mkdir requirements
  COPY requirements requirements
  RUN pip install -r requirements/local.txt
  COPY . /vagrant/
  </code></pre>
  
  <p>docker-compose.yml</p>
  
  <pre><code>postgis:
    image: mdillon/postgis:9.3
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: "postgres"
  #  volumes:
  #    - /etc/postgresql
  #    - /var/log/postgresql
  #    - /var/lib/postgresql
  
  web:
    build: .
    dockerfile: Dockerfile
    command: python manage.py runserver 0.0.0.0:8000 --settings=xxx.settings.local
  #   https://stackoverflow.com/a/31567743/977622
  #  volumes:
  #    - .:/vagrant
    ports:
      - "8000:8000"
    links:
      - "postgis:postgis"
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>when i run the <code>mount</code> command inside my vm i get:</p>
  
  <pre><code>tmpfs on / type tmpfs (rw,relatime,size=918096k)
  proc on /proc type proc (rw,relatime)
  sysfs on /sys type sysfs (rw,relatime)
  devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
  tmpfs on /dev/shm type tmpfs (rw,relatime)
  fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
  /dev/sda1 on /mnt/sda1 type ext4 (rw,relatime,data=ordered)
  cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
  cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
  cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
  cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
  cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
  cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
  cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
  cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
  cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
  cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
  cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
  cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
  /dev/sda1 on /mnt/sda1/var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
  none on /mnt/sda1/var/lib/docker/aufs/mnt/137fb1ad9a432a3f4fa47667ecc9991c10149b71f02dfc06a8134fc348532a3d type aufs (rw,relatime,si=462e07a762a4065f,dio,dirperm1)
  shm on /mnt/sda1/var/lib/docker/containers/137fb1ad9a432a3f4fa47667ecc9991c10149b71f02dfc06a8134fc348532a3d/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
  mqueue on /mnt/sda1/var/lib/docker/containers/137fb1ad9a432a3f4fa47667ecc9991c10149b71f02dfc06a8134fc348532a3d/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
  nsfs on /var/run/docker/netns/2e4dbeed7a66 type nsfs (rw)
  </code></pre>
  
  <p>My shared folders say in the UI that the folder path is <code>/home</code> </p>