How to install multiple Wordpress sites with docker in production

0

I'm unsure how I might host multiple wordpress sites with docker on my production server. I'm using docker-compose to create a container for wordpress and a container for mysql, this is just a single site though on my local dev machine. I'm considering the following:

1) Multiple wordpress containers, each with their own mysql containers - this seems the easiest to setup as each site and sites' database would have their own unique container. Seems like a lot of containers though.

For example, containers: wp1, db1, wp2, db2, wp3, db3, ...

,

2) Multiple wordpress containers, sharing a single mysql container - not totally sure whether this is possible but will pursue how-to if it appears to be a good idea.

For example, containers: db, wp1, wp2, wp3, ...

OR

3) Mutliple wordpress containers, however a single mysql instance running each database on the host - not sure whether this is easy to setup yet.

For example, containers: wp1, wp2, wp3, ... (mysql installed on the host machine, not in a container)

==

Anyway, would appreciate any feedback. I'm happy to do further research but each approach will take a little time to figure out so want to be on the correct path first of all.

Martyn

Posted 2019-11-06T00:17:38.577

Reputation: 135

No answers