title: Docker compose error "In file './docker-compose.yml', service 'punjab' must be a mapping not a string."
body: <p>I am getting a strange error in my docker-compose.yml file.</p>
  
  <p>I have prepared a docker-compose file for the stack punjab connection manager, ejabberd and mysql.</p>
  
  <p>Below is the docker-compose.yml file</p>
  
  <pre><code>version: '2'
  services:
    punjab:
      image:punjab
      ports
       - 5280:5280
      links
       - ejabbberd:ejabberd
    ejabberd:
      image: ejabberd
      depends-on:
        - mysql
      links:
        - mysql:mysql
    mysql:
      image:mysql
  </code></pre>
  
  <p>When I run the command docker-compose up from the command line and from the same directory where I have the docker-compose.yml file, I get the following error.</p>
  
  <p><strong>ERROR: In file './docker-compose.yml', service 'punjab' must be a mapping not a string.</strong></p>
  
  <p>I parsed the yml file using yamllint as well and the file is correctly formatted.</p>