Creating a React & WordPress Website with Docker Compose
Introduction
Note: I’ve included a link to the supporting GitHub repository at the bottom of this article. Shamelessly forcing you to scroll through the article :)
Docker Compose is the best. I use it for pretty much everything. If there was a Docker Compose equivalent to orchestrating my own life, I’d probably use that too. Admittedly, Docker is the only container-based tool I’ve used so I have nothing to compare it to; the classic “when all you have is a hammer” concept. But I think that is valuable sometimes because it allows us to take a tool and really see how much value we can milk out of it.
I wanted to create a portfolio website for my brothers and I, cernera.me, using React and a companion blog, blog.cernera.me, using WordPress. Checking my toolbox of tools — looks like a perfect time to use Docker Compose again!
Purpose
The goal of this article is to compose together:
- a React application
- a WordPress application
- an NGINX web server
- a MySQL database
The MySQL database will act is the storage mechanism for our WordPress service to store users, posts, and so on. The NGINX service will act as our web…