title: starting postgres container with persistant volume [docker compose]
body: <p>I have a problem with my database container, so I want to mount an existant database(from host) to the generated container (with docker-compose). I will show you the important part of the yaml file : </p>
  
  <pre><code>postgres:
          image: postgres
          environment:
              POSTGRES_USER: user
              POSTGRES_PASSWORD: pass
          ports:
          - "5432:5432"
          volumes:
          - ./postgres/data:/var/lib/postgresql/data
  </code></pre>
  
  <p>So, when I build and turn on docker-compose, postgres container  exited: </p>
  
  <p><a href="https://i.stack.imgur.com/4XN65.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4XN65.png" alt="enter image description here"></a></p>
  
  <p>If I remove the persistant volume, it wokrs ! I have also tested with mysql, mongodb -> same issue.</p>
  
  <p>Could you light me up ? </p>
  
  <p>Thanks.</p>