Skip to content

hussienzietoon/wordpress-docker-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

WordPress Docker Cluster with NGINX Load Balancing

This project demonstrates a containerized WordPress infrastructure using Docker Compose.
It simulates a small high availability WordPress hosting environment with multiple application nodes and an NGINX load balancer.

The stack includes:

• NGINX reverse proxy and load balancer
• two WordPress application containers
• MySQL database container
• persistent storage using Docker volumes

The goal of the project is to practice infrastructure setup, container orchestration, and troubleshooting typical WordPress hosting issues.


Architecture

Client

NGINX Load Balancer

WordPress Container 1
WordPress Container 2

MySQL Database

NGINX distributes traffic across the WordPress containers while both instances share the same MySQL database.


Tech Stack

Linux
Docker
Docker Compose
NGINX
WordPress
MySQL


Services

NGINX

Acts as a reverse proxy and load balancer.

Responsibilities:

• distributes requests between WordPress containers
• routes HTTP traffic to backend services
• simulates load balancing used in real hosting environments

WordPress Containers

Two WordPress instances simulate horizontal scaling.

Responsibilities:

• serve the WordPress application
• connect to the shared MySQL database
• handle incoming requests forwarded by NGINX

MySQL Database

Stores WordPress application data including:

• posts
• users
• configuration
• plugins and metadata

Database persistence is implemented using Docker volumes.


Volumes

wordpress_data
Stores WordPress files and persistent data.

db_data
Stores MySQL database data to prevent data loss when containers restart.


Container Dependencies

WordPress containers depend on the MySQL database service.

NGINX depends on the WordPress containers to route incoming requests correctly.

Docker Compose manages the startup order and networking between services.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors