Closed ulises-jeremias closed 9 months ago
The proposed changes introduce a Docker Compose configuration for a WordPress environment with MariaDB or MySQL. The setup includes Nginx and WordPress configurations, a MySQL/MariaDB initialization script, and relevant deployment and cleanup commands.
File | Summary |
---|---|
examples/compose-wordpress-mysql/README.md |
Introduces Docker Compose configuration for WordPress with MariaDB/MySQL, including deployment and cleanup commands. |
examples/compose-wordpress-mysql/db/init.sql |
Includes SQL statements for database creation and user privilege management. |
examples/compose-wordpress-mysql/nginx/default.conf |
Adds an Nginx configuration file for handling requests and preserving client information. |
examples/compose-wordpress-mysql/wordpress/000-default.conf |
Adds a new Apache web server virtual host configuration. |
🐇
In the land of code, where logic intertwines,
A Docker setup blooms, as bright as sunshine.
WordPress and MariaDB, together they dance,
With Nginx and Apache, in a harmonious prance.
So celebrate this change, for it's a mighty fine sight,
A testament to progress, in the soft glow of moonlight. 🌙
What's this PR do?
Description
This pull request introduces an enhanced Docker Compose configuration for setting up a WordPress environment. The updated configuration leverages the lightweight Nginx web server, the latest WordPress version (6.3.1 with PHP 8.2), and MariaDB (11.0.3) as the database.
Changes Made
nginx Service: Utilizes the
nginx:alpine3.18-slim
image, depends on the WordPress service, and maps port 80 for web traffic. Custom Nginx configurations are provided in the./nginx
directory.wordpress Service: Hosts WordPress with the
wordpress:6.3.1-php8.2
image, ensuring automatic restarts. It is configured with environment variables specifying the database host, user, password, and name. The./wordpress
directory is used for content storage.db Service: Relies on the MariaDB image (
mariadb:11.0.3
), sets environment variables for the root password and WordPress database name. Data persistence is ensured through volumes, storing MariaDB data indb-data
and initializing the database with scripts in./db
.Volumes: Defines a named volume
db-data
for MariaDB data storage.How to Test
docker-compose up -d
to initiate the environment.http://localhost:80
in your web browser.Feel free to review, test, and provide feedback!
Summary by CodeRabbit