Update README.md

This commit is contained in:
2025-06-23 14:15:27 +00:00
parent a755a45749
commit 5cbdcd51c8

View File

@@ -1,21 +1,21 @@
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/06/wordpress-logo-scaled.png" alt="Caddy" width="500"> <img src="https://jhammah.com/wp-content/uploads/2025/06/wordpress-logo-scaled.png" alt="Screenshot" width="500">
</picture> </picture>
</a> </a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/docker-icon.png" alt="Docker" width="175"> <img src="https://jhammah.com/wp-content/uploads/2025/05/docker-icon.png" alt="Screenshot" width="175">
</picture> </picture>
</a> </a>
</p> </p>
<br> <br>
<h1 align="center">How to efficially install, host, and maintain lightning fast Wordpress websites inside Docker Desktop. </h1> <h1 align="center">How to efficiently install, host, and maintain lightning fast Wordpress websites inside Docker Desktop. </h1>
<br> <br>
@@ -39,26 +39,44 @@
# Prerequisite # Prerequisite
- **If you are using Cloudflare to host your domain, you NEED to make sure that it's SSL/TLS encryption mode is set to Full (strict). Be default, domains are set to Flexible and you'll get thrown in an infinite loop when using a reverse proxy.** - **If you are using Cloudflare to host your domain, you NEED to make sure that it's SSL/TLS encryption mode is set to 'Full (strict)'. By default, domains are set to 'Flexible' and you'll get thrown in an infinite loop when you try and go to your website while using a reverse proxy.**
- **For these instructions we'll be using the example domain called " website.com " and will be changing things to " wp-website-com " in the appropriate locations in the files.** - **For these instructions we'll be using the example domain called 'website.com' and will be changing names and code to match it accordingly, like this 'wp-website-com'.**
- **For very nice organization, I recommend keeping the ' wp- ' part at the beginning of the naming scheme so you can easily filter out containers and find what you're looking for very quickly and neatly.** - **For very nice organization, I recommend keeping the ' wp- ' part at the beginning of the naming scheme so you can easily filter out containers and find what you're looking for very quickly and neatly.**
- **The password to extract all of the tutorial files from the zip file is: JHammaH** - **The password to extract all of the tutorial files from the zip file is: JHammaH**
- **Create a folder called ' wordpress ' in an easy to find directory like: '** c:/docker/**wordpress '**
- **Extract the contents of the downloaded zip file to inside the new ' wordpress ' folder. You will see three files. A .bat file, a dockerfile, and a folder called ' wp-new-site '**
<p align="center">
<a href="https://tip.jhammah.com">
<picture>
<img src="website" alt="Screenshot" width="1280">
</picture>
</a>
</p>
<br> <br>
<br> <br>
# Creating a Custom Network # Creating a Custom Network
* **Creating a Custom Network** * **Before you do anything else, you'll need to create a custom network specifically for your Wordpress sites so you don't run out of IP's which can confuse docker and cause issues with reverse proxies.**
* **Conveniently I made a simple batch file called 'create-docker-wordpress-network.bat' that all you need to do is double-click.**
* **It will create the network range 10.64.0.0 within Docker and then delete itself since you only need to run it once.**
* **If you want to use a different network range instead of 10.64.0.0, you can right click on the batch file and change the range to whatever you want. Then save the bat file and run it.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/caddy_yml_1.png" alt="Docker" width="1280"> <img src="website" alt="Screenshot" width="1280">
</picture> </picture>
</a> </a>
</p> </p>
@@ -67,14 +85,25 @@
<br> <br>
## Folder Organization # Folder Organization
* **Folder Organization** * **Now you'll need to organize the folder names, which is very important.**
* **Copy the ' wp-new-site ' folder and paste it in the same directory and it should create a new folder called ' wp-new-site - Copy '. This will leave the ' wp-new-site ' folder untouched so it can remain a template that you can copy/paste as many times as you want for any new site you want to launch.**
* **Rename the new folder you just created, ' wp-new-site - Copy ', to match your specific domain. Ex. ' wp-website-com '. You're keeping the 'wp-' part for easy filtering. You're changing the word 'new' to whatever your domain is. Then you're changing the word 'site' to whatever your domain extention is.**
* So here are a couple of examples:
* For 'jhammah.com', you would change 'wp-new-site' to 'wp-jhammah-com'
* For 'takedownthe.gov', you would change 'wp-new-site' to 'wp-takedownthe-gov'
* For 'dronework.pro', you would change 'wp-new-site' to 'wp-dronework-pro'
* **For this tutorial, I'll be creating a site for the domain I own, scrapyardplays.com, which means I'll change 'wp-new-site' to 'wp-scrapyardplays-com'**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/caddy_yml_1.png" alt="Docker" width="1280"> <img src="website" alt="Screenshot" width="1280">
</picture> </picture>
</a> </a>
</p> </p>
@@ -83,14 +112,14 @@
<br> <br>
## Configuring .env file # Configuring .env file
* **This is the .env file. Here you will want to enter your cloudflare API token as well as the email address you log into cloudflare with. This .env file will create variables that you can reference in your Caddyfile.** * **This is the .env file. Here you will want to enter your cloudflare API token as well as the email address you log into cloudflare with. This .env file will create variables that you can reference in your Caddyfile.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/caddy_env_1.png" alt="Docker" width="1280"> <img src="website" alt="Screenshot" width="1280">
</picture> </picture>
</a> </a>
</p> </p>
@@ -99,7 +128,7 @@
<br> <br>
## Configuring docker-compose.yml file # Configuring docker-compose.yml file
* **Configuring docker-compose.yml file** * **Configuring docker-compose.yml file**
@@ -110,7 +139,7 @@ code
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/caddy_yml_1.png" alt="Docker" width="1280"> <img src="website" alt="Screenshot" width="1280">
</picture> </picture>
</a> </a>
</p> </p>
@@ -119,7 +148,7 @@ code
<br> <br>
## Execute and Test # Execute and Test
* **Execute and Test** * **Execute and Test**
@@ -130,7 +159,7 @@ docker-compose up -d
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/caddy_dockerfile_1.png" alt="Docker" width="1280"> <img src="website" alt="Screenshot" width="1280">
</picture> </picture>
</a> </a>
</p> </p>
@@ -139,14 +168,14 @@ docker-compose up -d
<br> <br>
## Reverse Proxy Steps # Reverse Proxy Steps
* **This is the Caddyfile. This file tells Caddy what and how to do things.** * **This is the Caddyfile. This file tells Caddy what and how to do things.**
<p align="center"> <p align="center">
<a href="https://tip.jhammah.com"> <a href="https://tip.jhammah.com">
<picture> <picture>
<img src="https://jhammah.com/wp-content/uploads/2025/05/caddy_caddyfile_1.png" alt="Docker" width="1280"> <img src="website" alt="Screenshot" width="1280">
</picture> </picture>
</a> </a>
</p> </p>