AIO Wordpress for Docker

This repository contains Docker Compose and Dockerfile configurations for creating a containerized WordPress application with PHP 8.2 and Nginx. The Docker Compose file creates multiple containers for WordPress, MySQL, and Nginx, while the Dockerfile builds a single image that includes PHP, Nginx, and WordPress.

Docker Build and Push Docker Build and Test

Unlicense Visual Studio Docker

Compose File

This Docker Compose file creates a container with PHP 8.2, Nginx, and WordPress. The wordpress container uses the official WordPress image and runs on the db container to access the MySQL database. The nginx container runs as a reverse proxy for the wordpress container, forwarding requests to port 8080 to the wordpress container.

Packages

Package Description
WordPress An open-source software used for creating websites and blogs. WordPress is run in its own container.
MySQL An open-source database used for storing WordPress data. MySQL is run in its own container.
Nginx A web server and reverse proxy used to access WordPress via ports 80 and 443.

Ports

Port Usage
80 Used by Nginx to forward HTTP requests to the WordPress container.
443 Used by Nginx to forward HTTPS requests to the WordPress container.
8080 Used by the WordPress container to receive HTTP requests from Nginx and access the MySQL database.

Usage

  1. Make sure Docker is installed on your computer.
  2. Download the Docker Compose file and save it in a directory on your computer.
  3. Open a terminal and navigate to the directory where you saved the Docker Compose file.
  4. Run docker-compose up -d to start the containers.
  5. Open your web browser and navigate to the address http://localhost to start WordPress.
  6. Follow the instructions to configure WordPress and create your blog or website.

Dockerfile

This Dockerfile creates an image with PHP 8.2, Nginx, WordPress, and Node.js. The image also includes Composer for installing WordPress and an Nginx configuration file for running Nginx as a reverse proxy for PHP-FPM.

Packages

Package Description
WordPress An open-source software used for creating websites and blogs. WordPress is run in its own container.
MySQL An open-source database used for storing WordPress data. MySQL is run in its own container.
Nginx A web server and reverse proxy used to access WordPress via ports 80 and 443.
Node.js Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.

Ports

Port Usage
80 Used by Nginx to forward HTTP requests to the WordPress container.

Usage

  1. Make sure Docker is installed on your computer.
  2. Download the Dockerfile and Nginx configuration file and save them in a directory on your computer.
  3. Open a terminal and navigate to the directory where you saved the Dockerfile and configuration file.
  4. Run docker build -t my-wordpress . to build the Docker image.
  5. Run docker run -p 80:80 -d my-wordpress to start the container.
  6. Open your web browser and navigate to the address http://localhost to start WordPress.
  7. Follow the instructions to configure WordPress and create your blog or website.