title: Service 'wp' depends on service 'wpdb:mysql' which is undefined
body: <p>I try to build and run the following <code>yml</code> file using <code>docker-compose up -d</code> and I am getting the following error:</p>
  <p><code>Service 'wp' depends on service 'wpdb:mysql' which is undefined.</code></p>
  <p><code>docker-compose.yml</code> file:</p>
  <pre><code>version: '3'
     services:
         wpdp:
             image: mariadb
             ports:
                 - &quot;8081:3306&quot;
             environment:
                 MYSQL_ROOT_PASSWORD: &quot;root_password&quot;
                 MYSQL_DATABASE: &quot;db_name&quot;
                 MYSQL_USER: &quot;db_user&quot;
                 MYSQL_PASSWORD: &quot;db_password&quot;
        wp:
            image: wordpress
            volumes:
                - ./:/var/www/html
            ports:
                - &quot;8080:80&quot;
            depends_on:
                - wpdb:mysql
            links:
                - wpdb:mysql
            environment:
                WORDPRESS_DB_USER: &quot;wp_user&quot;
                WORDPRESS_DB_PASSWORD: &quot;wp_password&quot;
                WORDPRESS_DB_NAME: &quot;db_name&quot;
  </code></pre>
  <p>I followed this <a href="https://medium.com/@tatemz/local-wordpress-development-with-docker-3-easy-steps-a7c375366b9" rel="nofollow noreferrer">tutorial</a>.</p>
  <p>I searched a lot but couldn't find a solution</p>