eBook - PHP Deployment Explained
State-of-the-Art Deployment of PHP Applications
This eBook covers the deployment of PHP applications, be it onto a staging server, a production server, or a farm of production servers.
You will learn how set up a modern stack for operating PHP applications using nginx, PHP-FPM, and FastCGI. Among many other benefits over old-fashioned PHP stacks that use Apache HTTPD, for instance, this stack will allow you to use different configurations for and versions of PHP for different parts of your application. With regard to the operating system, we cover CentOS, Debian, Red Hat Enterprise Linux (RHEL), and Ubuntu.
We realize that if you use Debian or Ubuntu then you do not want to get distracted by how things are done over in the land of Red Hat Enterprise Linux and CentOS (and vice versa). To provide you with the best possible reading and learning experience, we decided to create two editions of this eBook: one for Debian and Ubuntu and one for Red Hat Enterprise Linux and CentOS. Of course, you have access to both editions.
We strongly believe that the separation of concerns principle should also be applied to the deployment process and divide this process into the distinct phases of packaging, publishing, distribution, and activation.
We start by creating a package when a new version of the application is to be released. This package is then published in a repository from where it is distributed onto the server(s). We also cover creating a shippable image for deployment using Docker as an alternative to "just" creating a package.
We show you how to migrate from one version of your application to the next when the structure of your data, for instance the schema of your relational database, changes.
Just because a new version of the application is installed on the server(s), though, should not mean that it is "live". Having a separate activation step opens interesting possibilities that we cover in detail.