nezhar / wordpress-docker-compose

Easy Wordpress development with Docker and Docker Compose
MIT License
1.84k stars 1.31k forks source link

Use depends_on so that wordpress doesn't have to wait for the db #1

Closed HackToHell closed 7 years ago

HackToHell commented 7 years ago

Also removed the IP so that it's generic and binds to 0.0.0.0 Also removed the network as the docker compose v2 does that by default.

nezhar commented 7 years ago

The _dependson option should be added, I totally agree.

As for the network, an explicit definition makes it easier to understand what is going on there, and how the services connect to each other. This might be useful when adding other services.

The IP address configuration is important, at least kind of a hint on how to set it, so you can run multiple development environments on the same machine without conflicting ports.

HackToHell commented 7 years ago

Ah okay, let me add in the docs on the IP @nezhar and set it to 127.0.0.1, because that's the default for most people, and they might not realise why it isn't working. I'll also push back the networks.

nezhar commented 7 years ago

I agree with that. Please update the pull request so I can merge.

HackToHell commented 7 years ago

Done :+1:

pdostal commented 7 years ago

Why do you specify the IP address? It listens on 0.0.0.0 by default which should be fine almost every development environment.

nezhar commented 7 years ago

@pdostal the idea is to use an explicit configuration. This is helpful if you need more than one instance of this configuration to run on the same machine.