How itfs1992/wordpress-dockerize works
This project is a Dockerized WordPress installation that is designed to spin up a full-stack WordPress environment along with its dependencies using containerized services. In essence, you have separate containers for the database (MySQL), an administration tool (phpMyAdmin), and the WordPress site itself (split between what appears to be two aspects — one for the “latest” WordPress installation files in wp-latest and another container built from wp-source). There’s also a folder with virtual host configuration files (in vhost), a helper script (export.sh), and the Docker Compose orchestration file (docker-compose.yml).
Main Components
• Docker Host & Docker Network:
– Show the Docker host creating a dedicated Docker network (“tcx-wordpress”) where all containers are attached.
• MySQL Container:
– Represent the container started from the “mysql” folder (has its own Dockerfile, a dump SQL file, and a script for initialization).
• phpMyAdmin Container:
– Represent the phpMyAdmin container (built from its Dockerfile and configured in config.inc.php).
• WordPress Components:
– “wp-latest” Directory: This contains the full WordPress installation (PHP files, themes, plugins, and the core admin files). It represents the codebase that is served to end users.
– “wp-source” Directory: Contains a Dockerfile, a sample vhost and a run.sh script and a wp-config.php. This folder is likely used to build a custom WordPress container image which may apply custom configurations or plugins.
– Represent the WordPress service container that is running the web server (Apache or Nginx) and PHP—this container will have the “wp-latest” folder mounted (or otherwise injected) and be built from “wp-source”.
• Virtual Host Configuration:
• External Access:
– Mark the client/browser and their HTTP connection to the WordPress site (e.g., hitting “http://localhost:8080/gglogin”).
– Also note that docker-compose orchestrates these services, so add a “Docker Compose” element responsible for starting and connecting all these containers.
Relationships & Data Flows
• That plugin installations and theme activations are carried out inside the WordPress container using WP CLI commands via “wp-source run.sh”.
Architectural Patterns & Technology Stack
• Micro-container architecture orchestrated by Docker Compose.
• That separation of concerns is maintained – the database, web app code, and admin interface are in distinct containers communicating over a private Docker network.
• Use of Dockerfiles in each service folder (mysql, phpmyadmin, wp-source), indicating custom container images.
• Mention that persistent storage for MySQL (implied by dump.sql.gz and script.sql in the mysql folder) is critical.
• If applicable, detail that the use of a “vhost” folder indicates explicit control of HTTP server routing rules.