Docker for Content Management Systems (CMS) Deployment

In addition to development technologies themselves, the continuous improvement of methodologies for the deployment of the created applications is rapid as well. With the largest part of online services still being focusing around content, the deployment of Content Management Systems (CMS) is very important.

Traditionally popular monolithic CMSes like WordPress and other tools have been deployed to a server. In recent years virtual server environments like Digital Ocean have been the defacto top-of-mind options for deployment. The cloud services hype has been around for a decade or so, but many cloud deployments were simply running virtual machines in a cloud provider like Amazon's AWS or Microsoft's Azure.

During the first half of 2016 the word Docker has been popping up quite a bit. This technology is now maturing rapidly and is likely to become a de-facto way of distributing and installing quite a few different applications. Content Management Systems are one of these that will be using Docker for deployment as well as development processes.

What's Docker and what does a CMS need to provide to take true advantage of it?

So what is behind the Docker hype? First of all it's an old technological concept that has been made available. The idea is to ship software in containers that contain everything required to need to application. Instead of working on server configurations separate from the application, the Docker model makes the two very intertwined.

This allows easy replication of individual CMS instances allowing for true horizontal scalability with adding the number of servers, instead of horizontally by adding resources to a single server. This allows developers and businesses to take advantage of the cloud platform as the load can be spread to a large number of instances

In theory any PHP CMS can be ran on Docker, but to take true advantage of the container approach Docker has to offer, the underlying architecture needs to support distributed services. Instead of being tied to storing resources locally, they need to be able to be distributed on different machines. In addition the set of applications need to be robust enough to have any node go away or be added at any point.

PHP is perfect for the Cloud, but old architectures can make it hard to go scale with docker

With it's "shared nothing" architecture, the PHP language is perfect for cloud deployments. It's always had no support for resource sharing between servers by default. For deploying PHP applications, like Content Management Systems, in the cloud with Docker you'll need to make sure the following elements can be split to multiple servers:

  • User sessions
  • Caching
  • Logging
  • Binary storage (images)
  • Database

There are excellent projects that allow modern PHP and Symfony applications to be deployed on Amazon and ofter environments. While PHP itself is perfect for this, many of the applications have originally been built of a single server environment.

While clustering functionalities can be added to a CMS later on, this is an area where this should be a core concern. This is where Cotnent Management Systems with a modern architecture like eZ Platform or Sulu can have a significant advantage older older monolithic applications like WordPress or Joomla.

So the next time you are faced with the situation of selecting a CMS, a modern architecture that enables efficient cloud deployments should be high on your list.