Blog
October 29, 2026
Web application modernization can sometimes look deceptively simple on paper. Containerize the application. Move it to the cloud. Adopt Kubernetes. Automate deployments. But for teams responsible for business-critical PHP applications, each of those steps introduces a host of essential architectural and operational decisions. Trying to tackle all of them at once can turn modernization into a project so large that many teams have no idea where to start.
That’s why a more practical application modernization strategy is to break the process down into incremental steps and taking a more phased approach, and the 12-factor methodology provides a useful framework for doing exactly that.
In this blog, I'll look at the 12-factor app principles, how they relate to containerization, and where Docker Compose and Kubernetes fit in this process. I’ll also discuss how you can move toward a more portable, scalable application architecture without treating modernization as an all-or-nothing project.
On-Demand Webinar
Prefer to Watch This Blog?
The information included in this post was originally presented in a Zend webinar, "Think Big, Start Small: A Phased Approach to 12-Factor Web Applications." Watch the on-demand version below, and contact Zend to learn more.
What Is the 12-Factor Methodology?
At its core, the 12-factor methodology is an approach to building web applications around three important goals: shipping changes quickly, making provisioning portable and repeatable, and enabling applications to scale.
For development and operations teams, those goals have some very practical implications.
You want to be able to deploy an application reliably. You want your CI/CD processes to test and validate changes before production, and when something does fail, you want to identify the root cause, fix it, and roll out the correction quickly.
For me, one of the simplest tests is this: How nervous are you to deploy on a Friday?
If a production deployment routinely means having everybody standing by in case something breaks, it's probably worth taking a closer look at your architecture and deployment practices. The 12 factors provide a set of guidelines for improving both.
What Are the 12-Factor App Principles?
The 12-factor methodology covers a lot of ground, but each factor builds on one another. Rather than treating them as twelve unrelated boxes to check, I find it more useful to think about what they're trying to accomplish across your application lifecycle.
Here's the quick version:
- Codebase — Keep application code in version control, with deployments derived from the same codebase.
- Dependencies — Explicitly declare and isolate what your application needs to run.
- Configuration — Keep configuration separate from application code, preferably in the environment.
- Backing services — Treat databases, caches, queues, and similar resources as attached services.
- Build, release, run — Separate the process of building an application from releasing and running it.
- Processes — Run the application as one or more stateless processes.
- Port binding — Expose application services through ports.
- Concurrency — Scale through additional processes or instances.
- Disposability — Design processes to start quickly and shut down gracefully.
- Dev/prod parity — Keep development, staging, CI/CD, and production environments as similar as possible.
- Logs — Treat logs as event streams that can be aggregated and analyzed.
- Admin processes — Run administrative tasks as one-off processes within the same environment as the application.
Keep in mind that you don't need to adopt all 12 factors at once. In fact, I'd argue that's the wrong way to approach them for many existing web applications. The best strategy is always to start with the factors that solve problems you're experiencing now.
How 12-Factor Methodology Makes Web App Modernization Less Risky
There's another question I like to ask when discussing web app modernization: What would happen if you had to move your application to another provider today?
Ignore the database migration for a moment, and think specifically about the application runtime. How much work would it take to reproduce the application environment somewhere else?
That's where several of the 12-factor app principles start paying off.
If dependencies are explicitly defined, configuration is separated from the application, services are network-attached, and builds create repeatable production artifacts, infrastructure becomes less tightly coupled to the application itself. That portability matters during web application modernization because it gives you options.
Containerization and 12-Factor App Principles
This is where containers become especially useful.
Containerization complements many of the 12-factor app principles by giving you a consistent way to package your application, runtime, and dependency management. Instead of relying on system-wide packages or manually recreating an environment, you can explicitly define what the application needs and package those requirements together. That makes the application easier to reproduce across development, CI/CD, staging, and production.
Additionally, containers make it easier for you to build a production-ready artifact, apply environment-specific configuration when it runs, and use that same containerized application across different deployment environments. The result is greater portability and a stronger foundation for moving an application between infrastructure providers when requirements change.
But building containers is only part of the story. Once you have them, you need a way to manage and orchestrate them, and that’s where Docker Compose and Kubernetes come in.
Back to topDocker Compose vs. Kubernetes for a Phased Approach to Web App Modernization
Both Docker Compose and Kubernetes provide ways to orchestrate containerized applications, but they address different levels of operational complexity. For teams working toward a 12-factor architecture, the choice doesn't necessarily have to be one or the other.
Use this quick-reference guide to get started, and read on for more details.
| Docker Compose | Kubernetes | |
|---|---|---|
| Deployment model | Single host | Multi-host cluster |
| Best suited for | Development, prototyping, smaller deployments, and applications with predictable requirements | Applications requiring greater scale, resiliency, and availability |
| Learning curve | Easier to learn with relatively compact configuration | Steeper learning curve with more resources and configuration to manage |
| Scaling | Manual scaling within the limits of the host | Horizontal autoscaling across a cluster |
| High availability | Requires additional setup and external services | Supports high-availability architectures across multiple nodes |
| Self-healing | More limited | Can restart failed workloads and maintain multiple pods |
| Rolling updates | Updating a service requires replacing its container | Supports rolling updates that keep existing workloads running until replacements are healthy |
| Service discovery | Limited to the single-host environment | Built-in service discovery across the cluster |
| Configuration | Environment variables, .env files, and config volume mounts | ConfigMaps and Secrets injected at runtime |
PHP Resource
Docker Compose vs. Kubernetes: What's Your Best Option?
Join Zend Professional Services Manager Adam Culp for a walkthrough comparing Docker Compose and Kubernetes.
Docker Compose Provides a Practical Starting Point
Docker Compose defines and runs multi-container applications. Using a YAML configuration file, you can describe the services your application needs, how they're configured, and how they work together.
For many teams, Docker Compose is the logical first step toward putting 12-factor app principles into practice. It's relatively approachable, provides a compact way to describe multiple services and their interactions, and works particularly well for development, prototyping, and applications running on a single host.
More importantly for an application modernization roadmap, Compose addresses a number of 12-factor concerns. You can define environment variables separately from the application, separate building a container from running it, start and stop containers quickly, aggregate logs, and run one-off administrative processes within the same application environment.
Kubernetes Offers More Advanced Capabilities
Kubernetes is a container orchestration platform for deploying, managing, and scaling containerized applications across multiple hosts. Where Docker Compose provides a relatively straightforward way to manage containers on a single host, Kubernetes is designed to coordinate applications across a cluster, with capabilities such as self-healing, rolling updates, autoscaling, service discovery, and secrets management.
Consider disposability. With Compose, replacing a container requires stopping that service and starting its replacement. With Kubernetes, rolling updates can keep the current application running until the replacement is healthy before moving traffic. Kubernetes can also restart failed workloads.
You can also consider concurrency. Instead of manually determining how many application instances should be running on a single host, Kubernetes allows workloads to scale horizontally across a cluster.
Those capabilities make Kubernetes a strong fit for applications that need greater scalability and resiliency — but those same features also introduce considerably more operational complexity.
The Kubernetes Trade-Off for Web App Modernization
There's a considerable amount to understand before operating Kubernetes well, and the fact may be that your team is not ready for Kubernetes yet.
Resources need to be described correctly. Configuration dependencies can dictate the order in which resources need to be applied. Networking and access controls introduce their own considerations. While Helm helps by making Kubernetes resources more reusable through templates, somebody still needs to create and maintain those charts.
This is where I think web app modernization efforts sometimes get ahead of themselves. Often, I see teams looking at Kubernetes as the destination, then immediately deciding they need Kubernetes instead of allowing their web application to dictate their requirements.
If your application runs perfectly well on one server, has predictable traffic, and doesn't require high availability, the additional operational complexity that comes with Kubernetes may not provide enough benefit yet. If the application requires elastic scaling, multiple servers, or high availability, that's when the equation starts changing.
Back to topHow to Simplify Phased Web Application Modernization
The challenge, of course, is that even a phased approach to modernization requires teams to assemble and operate several pieces of infrastructure.
That's one of the problems we're addressing with the Zend Web Platform. It offers two editions that map well to the modernization stages I've described:
- The Core Web Platform uses Docker Compose to provide a containerized PHP application platform.
- The Enterprise Web Platform uses Kubernetes for more advanced orchestration, horizontal autoscaling, high-availability architectures, and enterprise scaling.
The idea is to let teams start at the level their applications actually require while bringing together capabilities that support a more modern operating model. Plus, it’s important to note — the benefits of the platform don’t end at containerization. Regardless of edition, it also offers:
- Observability – Access real-time insights into application health for proactive issue resolution
- Security – Use OpenTelemetry data to reduce attack surfaces and streamline threat response.
- Portability – Keep complete control of your application and future infrastructure decisions.
- Unified Command Center – Access unified logs, metrics, and tracing via easy-to-use dashboards and custom visualizations
You can watch this video introduction for more details, and contact Zend to schedule a demo.
Final Thoughts
While tools like the Zend Web Platform can help with web application modernization, the important part is to remember that you don't have to take on all that complexity on day one. In fact, it’s better to break the process down into manageable pieces and achievable milestones.
You can start with a container-ready foundation using Core and Docker Compose, then move to Enterprise and Kubernetes when requirements such as elastic scaling, high availability, or multi-server orchestration justify the additional investment. That progression mirrors the phased approach behind the 12-factor methodology: start with the improvements your application needs today and build from there.
Mission-Critical PHP Made Possible
Make the Zend Experts Your Experts
If you need help enacting your PHP application modernization strategy, Zend is in your corner. We can assist you in configuring and deploying the Zend Web Platform, or our Professional Services team can support you in planning, executing, and maintaining a future-proof web application.