title: Docker-Compose phpmyadmin and mysql together for local development
body: <pre><code>version: "3.1"
  services:
  
   redis:
    image: redis:alpine
    container_name: larablog-redis
  </code></pre>
  
  <p>the code was working fine until I added the following services</p>
  
  <pre><code> db:
    image: mysql:8.0
    container_name: larablog-mysql
    working_dir: /application
    volumes:
      - ./src:/application
    environment:
      - MYSQL_ROOT_PASSWORD=rootpass
      - MYSQL_DATABASE=larablog
      - MYSQL_USER=larauser
      - MYSQL_PASSWORD=larauserpass
    ports:
      - "8890:3306"
  
  
   phpmyadmin:
   image: phpmyadmin/phpmyadmin
   environment:
          PMA_ARBITRARY: 1
          MYSQL_USER: larauser
          MYSQL_PASSWORD: larauserpass
          MYSQL_ROOT_PASSWORD: rootpass
   ports:
          - "80:80"
      links:
          # for mysql container
          - "db:db"
   volumes:
      db:
          driver: "local"
  </code></pre>
  
  <p>I am trying to follow a method I found on <a href="https://gotechnies.com/docker-compose-yml-mysql-phpmyadmin/" rel="nofollow noreferrer">https://gotechnies.com/docker-compose-yml-mysql-phpmyadmin/</a> however I cannot start from scratch because I need the laravel framework as well</p>
  
  <pre><code> webserver:
    image: nginx:alpine
    container_name: larablog-webserver
    working_dir: /application
    volumes:
        - ./src:/application
        - ./phpdocker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
    ports:
     - "8888:80"
  
  
  
   php-fpm:
    build: phpdocker/php-fpm
    container_name: larablog-php-fpm
    working_dir: /application
    volumes:
      - ./src:/application
      - ./phpdocker/php-fpm/php-ini-overrides.ini:/etc/php/7.1/fpm/conf.d/99-overrides.ini
  </code></pre>
  
  <p>I get this error when i try to run docker-compose up -d ...</p>
  
  <pre><code>ERROR: yaml.parser.ParserError: while parsing a block mapping
  in ".\..\docker-compose.yml", line 27, column 6
  expected &lt;block end&gt;, but found '&lt;block mapping start&gt;'
  in ".\..\docker-compose.yml", line 35, column 9
  </code></pre>
  
  <p>How can I overcome this error?</p>