This is an exercise on building a Docker container cluster inside a virtual machine (here, Debian 10) using Docker, Docker-Compose and Docker Volume for data persistence.
All the Dockerfiles are written by myself, the only pulls are Debian and Alpine
A Docker cluster is a Wordpress website working inside a Docker Network with default options.
Backend side is a MySql Database.
Frontend side are Wordpress standard files.
.php files are processed with NGINX's FAST-CGI module with php-fpm working as a service on a separate container.
Wordpress files are changed on the basis of service_names and users inside the MySQL database.
Database files are mounted into ~/data/dbdata
Wordpress files are mounted into ~/data/wordpress
-
Download Docker Desktop, Docker CLI or a Docker Virtual Machine
-
cd
into the root of the project -
run
make
- In the root folder of the project run
bash ./srcs/debian_setup.sh
This will install all the necessary dependencies for Docker Engine cd
into the root of the project- run
make
All the services are installed within the Dockerfiles.
- The website is available at https://localhost:443