From 4df6629bad8b1b8541724334495f6fa9b11e1e91 Mon Sep 17 00:00:00 2001 From: Sayed Jawad Hussaini Date: Wed, 19 Mar 2025 05:20:20 +0100 Subject: [PATCH] readme --- z1/README.md | 117 +++++++++++++++++++++++++++++++++++ z1/README.md:Zone.Identifier | 3 + 2 files changed, 120 insertions(+) create mode 100644 z1/README.md create mode 100644 z1/README.md:Zone.Identifier diff --git a/z1/README.md b/z1/README.md new file mode 100644 index 0000000..4fab113 --- /dev/null +++ b/z1/README.md @@ -0,0 +1,117 @@ +# WordPress with MySQL Docker Application + +This application deploys WordPress with MySQL as the database backend using Docker containers. The setup includes persistent storage for both the WordPress files and the MySQL database. + +## Prerequisites + +To run this application, you need: + +- Docker Engine (version 20.10.0 or newer) +- Bash shell environment +- 1GB+ of free RAM +- 1GB+ of free disk space +- Internet connection to pull Docker images + +## What the Application Does + +This application sets up: + +1. A WordPress instance that serves as a content management system +2. A MySQL database that stores WordPress data +3. Persistent volumes to maintain data between restarts +4. A dedicated network for secure inter-container communication + +## Virtual Networks + +- `wordpress_network`: A bridge network for communication between the WordPress and MySQL containers. This network allows the containers to reference each other by container name instead of IP addresses. + +## Named Volumes + +- `wordpress_data`: Stores WordPress files, themes, plugins, and uploads +- `db_data`: Stores MySQL database files + +These volumes ensure data persistence across container restarts and application updates. + +## Container Configuration + +### MySQL Container + +- Image: `mysql:5.7` +- Container name: `db` +- Environment variables: + - `MYSQL_ROOT_PASSWORD`: Root password for MySQL + - `MYSQL_PASSWORD`: Database password for the WordPress user + - `MYSQL_USER`: Database user for WordPress (jawad1) + - `MYSQL_DATABASE`: Database name for WordPress (cloud_database) +- Volume mounted: `db_data:/var/lib/mysql` +- Network: `wordpress_network` +- Restart policy: `unless-stopped` (automatically restarts if the container fails) + +### WordPress Container + +- Image: `wordpress:latest` +- Container name: `wordpress_app` +- Environment variables: + - `WORDPRESS_DB_HOST`: Database hostname (db) + - `WORDPRESS_DB_USER`: Database username (jawad1) + - `WORDPRESS_DB_PASSWORD`: Database password (jawad@password123) + - `WORDPRESS_DB_NAME`: Database name (cloud_database) + - `WORDPRESS_CONFIG_EXTRA`: Additional WordPress configuration +- Port mapping: `8080:80` (exposes WordPress on port 8080) +- Volume mounted: `wordpress_data:/var/www/html` +- Network: `wordpress_network` +- Restart policy: `unless-stopped` (automatically restarts if the container fails) + +## Usage Instructions + +### Preparing the Application + +Run the prepare script to download Docker images: + +```bash +chmod +x prepare-app.sh +./prepare-app.sh +``` + +### Running the Application + +Start the containers with: + +```bash +chmod +x start-app.sh +./start-app.sh +``` + +After starting, WordPress will be available at http://localhost:8080 + +The first load may take some time as WordPress initializes the database and sets up the environment. + +### Stopping the Application + +Stop the running containers without removing data: + +```bash +chmod +x stop-app.sh +./stop-app.sh +``` + +### Removing the Application + +To completely remove the application, including all data: + +```bash +chmod +x remove-app.sh +./remove-app.sh +``` + +**Warning:** This will delete all your WordPress data and MySQL databases! + +## Accessing the Web Application + +After starting the application, access WordPress through your web browser at: + +``` +http://localhost:8080 +``` + +The first time you access this URL, you'll be guided through the WordPress setup process where you can create an admin account and configure your site. diff --git a/z1/README.md:Zone.Identifier b/z1/README.md:Zone.Identifier new file mode 100644 index 0000000..73cdf12 --- /dev/null +++ b/z1/README.md:Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://claude.ai/