title: docker-compose.yml error while trying to persist data on a volume
body: <p>In my Docker Instance, I created a volume called <code>jokes</code>. I'm trying to build out my service now with <code>docker-compose up</code> but I keep getting this error message:</p>
  
  <pre><code>ERROR: The Compose file './docker-compose.yml' is invalid because:
  services.db.volumes contains an invalid type, it should be an array
  </code></pre>
  
  <p>Here is my <code>docker-compose.yml</code> file:</p>
  
  <pre><code>version: '3.6'
  services:
    web:
      build: .
      command: puma
      depends_on:
        - db
      environment:
        DATABASE_URL: "postgres://postgres@db"
      ports:
        - "3000:3000"
      volumes:
        - "./:/app"
      working_dir: /app
    db:
      image: "postgres:10.3-alpine"
      volumes: "-jokes: /var/lib/postgresql/data"
  volumes:
    jokes: ~
  </code></pre>
  
  <p>How should I fix this?</p>