How to set WORDPRESS_DB_HOST in docker-compose
<p>I would like to know how to set WORDPRESS_DB_HOST in docker-compose file.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>wordpress:
    image: wordpress
    ports:
        - 8080:80
    environment:
        WORDPRESS_DB_PASSWORD: example
        WORDPRESS_DB_HOST: 192.168.99.100:3307

wordpress_db:
    image: mariadb
    environment:
        MYSQL_ROOT_PASSWORD: example
    ports:
        - 3307:3306
    volumes:
        - /doc/wordpress_db:/var/lib/mysql</code></pre>
</div>
</div>
</p>

<p>Here, "192.168.99.100" is my IP's docker machine. I would like to replace it by a dynamic value.</p>

<p>Thanks ! :)</p>