Caddy

Docker


How to efficially install, host, and maintain lightning fast Wordpress websites inside Docker Desktop.



# Navigation - [Prerequisite](#prerequisite) - [Creating a Custom Network](#creating-a-custom-network) - [Folder Organization](#folder-organization) - [Configuring .env file](#configuring-env-file) - [Configuring docker-compose.yml file](#configuring-docker-composeyml-file) - [Execute and Test](#execute-and-test) - [Reverse Proxy Steps](#reverse-proxy-steps) - [wp-config.php configuration](#wp-configphp-configuration) - [Caddyfile Configuration](#caddyfile-configuration)

# 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.** - **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 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**

# Creating a Custom Network * **Creating a Custom Network**

Docker



## Folder Organization * **Folder Organization**

Docker



## 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.**

Docker



## Configuring docker-compose.yml file * **Configuring docker-compose.yml file** ```yml code ```

Docker



## Execute and Test * **Execute and Test** ```ps1 docker-compose up -d ```

Docker



## Reverse Proxy Steps * **This is the Caddyfile. This file tells Caddy what and how to do things.**

Docker



# wp-config.php configuration **wp-config.php configuration** ```php docker-compose up -d ```

# Caddyfile configuration **wp-config.php configuration** ```ps1 docker-compose up -d ```

Support the channel so I can make more tutorials!

If this tutorial helped you out, feel free to buy me a coffee!