Why this template?
This Panamax template gives you two WordPress installations that will be sharing web traffic. This will be done through an HAProxy load balancer. We’re using MySQL as the database for both WordPress installations. This template gives you a real world example of how to use Docker and Panamax’s application templates to quickly set up a classic 3-layer web application cluster.
Panamax is Docker management for humans.
MySQL is the world’s most popular open source database.
WordPress is a web software you can use to create a beautiful website or blog.
HAProxy is a reliable, high performance TCP/HTTP load balancer
- RAM: 512 MB Minimum, 1GB Recommended, 2GB Preferred
- Cores: 1 core Minimum, 2 core Recommended
tutum/mysql:latest The most popular and easy to use mysql image on docker hub.
tutum/wordpress-stackable:latest A WordPress image that can connect to other databases like MySQL, MariaDB.
tutum/haproxy:latest A well maintained load balancer, and easy to use by simply linking to it.
Setup and access
You need to set up port forwarding through VirtualBox. This can be done by entering
virtualbox into your terminal. You will select
panamax-vm and go to Settings > Network > Port Forwarding and set the Host Port to 3333 or whatever you want, and the Guest Port to 80. This will let you access your WordPress installation through the assigned port.
You will need to go to the Manage tab of Panamax and add the repository https://github.com/tifayuki/panamax-contest-templates/ to your Sources.
Go to the Search tab and search for this template by typing in WordPress, finding WordPress – High Availability and click Run Template.
You can access the load balanced WordPress on http://localhost:3333 (replace “3333” with your designated port from the previous step)
You can add more WordPress instances to the cluster by adding more sections described in the template under category: Application Tier, and add a corresponding link in category: Load Balancer Tier.
- By default, the media uploaded to WordPress is stored inside the container’s file system, not in the database. Thus, an image uploaded to one container may not be accessible by the other container.
- To solve this, we use volume to share the
- To avoid permission problems, please ensure that
/app/wp-contentsexists on your Panamax host before launching this template.
To download Panaxmax, please visit: http://panamax.io/
To see the source, please visit: https://github.com/CenturyLinkLabs/panamax-contest-templates/blob/master/wordpress_high_availability.pmx