fballiano / docker-magento2

Cluster ready Magento2 + Varnish 7 + PHP 8.1 + Redis 6.2 + Elasticsearch 7.17 + SSL
355 stars 164 forks source link

DB container name should be same as service name in composer file #15

Closed bennythejudge closed 6 years ago

bennythejudge commented 6 years ago

In my understanding, the hostname of a container within a compose configuration is the name of the service in the compose file. ` db: image: mariadb ports:

Following the README to install Magento2, I found that the hostname suggest dockermagento2_db_1 did not work for me, but db did.

From the Docker doc:

For example, suppose your app is in a directory called myapp, and your docker-compose.yml looks like this:

` version: "3" services: web: build: . ports:

When you run docker-compose up, the following happens: A network called myapp_default is created. A container is created using web’s configuration. It joins the network myapp_default under the name web. A container is created using db’s configuration. It joins the network myapp_default under the name db.

I am going to submit a PR to this effect.

fballiano commented 6 years ago

thanks @bennythejudge, I merged your PR, sorry for the delay!