I\'ve created a small docker-compose.yml
which used to work like a charm to deploy small WordPress instances. It looks like this:
wordpress:
i
I was using your docker-compose.yml, had the same problem. Just restarting didn't fix. After nearly an hour of researching the logs, I found the problem was: wordpress
service started connecting mysql
service before it had fully started. Simply adding depends_on won't help.Docker Compose wait for container X before starting Y
the work around could be start the db
server before Up. When it has fully started, run docker-compose up
. Or just use external service.