eugeneware / docker-wordpress-nginx

A Dockerfile that installs the latest wordpress, nginx and php-fpm.
MIT License
874 stars 380 forks source link

Running this two times (to create two individual WordPress Dockers on a host machine) will lead to a conflicting database (due to the static volume and DB name)? #39

Open Dzhuneyt opened 9 years ago

Dzhuneyt commented 9 years ago

I noticed that you are mounting the mysql volume and always creating a DB named "wordpress" when this DockerFile is runned. What if I decide to run multiple WordPress installations with separate Dockers on a same host?

They will confluct due to the same DB name in my opinion - "wordpress".

The easiest solution would be to randomize the DB name based on a timestamp or some other mechanism to avoid conflicting names.

levino commented 8 years ago

No. You should mount different host volumes into the containers. One uniquely for one container instance. Or just not even mount anything into the container. Having multiple mysql daemons work on the same files will most likely destroy your dbs.