We’re proud to announce that 10up has partnered with Joyent to bring WordPress to their Docker infrastructure.
Joyent, an Infrastructure-as-a-Service (IAAS) company providing software to power their—and their clients’—cloud platforms, knows the difficulties in prepackaging software installations that can be readily moved across server environments. To solve this, Joyent uses Docker, a technology which packages an application with all of its dependencies into a standardized unit for software development. In plain terms, it creates a fully assembled, preconfigured, and portable software environment.
Docker offers several practical benefits for teams building websites and applications using repeatable configurations and industry best practices like testing environments. First, as simple as the WordPress famous 5-minute install is, it results in a default, out-of-the-box configuration; Docker helps engineers fast forward past the remaining configuration. Second, it ensures that multiple installations (local, staging, production, separate servers) mirror each other, so as to allow worry-free code deployments. We made inroads in solving this problem with Varying Vagrant Vagrants, and Docker takes that solution a step further.
Docker works by creating modular snapshots of preconfigured applications, called containers, that enable easily scalable hosting. If a site built with Docker containers experiences a spike in traffic, a host like Joyent can replicate any overtaxed container, such as a database server or web server, “horizontally” scaling the infrastructure to weather increased load. When the spike subsides, the virtual servers can be scaled back down just as simply. Because Joyent offers a “pay per minute” hosting model, this empowers site administrators to quickly and temporarily scale up their infrastructure during a surge without incurring a longer term cost increase.
10up created a Docker Compose project, housing several Docker containers which work together to create a scalable, complete WordPress stack, which includes the following containers:
- Nginx: load balancer to spread traffic between all backend WordPress containers;
- WordPress: based on the official Docker PHP 5.6 container image and extended to install and configure WordPress;
- Memcached: caches often-used data in memory. Based on the official Docker memcached image and integrates into ContainerPilot so memcached can announce its location to the rest of the cluster;
- NFS: single store for uploaded files, accessible from multiple WordPress containers;
- MySQL: database for WordPress;
- Consul: service discovery platform through which containers register and communicate with one another to build the project.