Update README.md & reload_caddy

This commit is contained in:
2024-12-30 21:15:05 +09:00
parent d22b377f73
commit d9a5322151
4 changed files with 9 additions and 14 deletions
+4 -2
View File
@@ -28,8 +28,8 @@ Ensure you have the following installed:
1. **Clone the repository**:
```bash
git clone https://github.com/your-username/CaddyWP.git
cd CaddyWP
git clone https://github.com/your-username/caddywp.git
cd caddywp
```
2. **Run the install script**:
@@ -40,7 +40,9 @@ Ensure you have the following installed:
## How It Works
Caddy: Serves as a reverse proxy, automatically obtaining SSL certificates and routing traffic to the correct WordPress container.
WordPress: Each WordPress site is hosted in its own Docker container, ensuring that each site runs in isolation with its own environment and database.
MariaDB: A single MariaDB container serves as the database for all WordPress sites. Each site uses a unique database user and password.
## License
+1
View File
@@ -87,6 +87,7 @@ while true; do
echo "1. Start Caddy:"
echo " cd ${CADDY_DIR} && docker compose up -d"
fi
reload_caddy
echo "2. Start WordPress:"
echo " cd ${WP_PROJECT_DIR} && docker compose up -d"
echo "3. Run the WordPress setup script:"
+1 -1
View File
@@ -2,7 +2,7 @@
reload_caddy() {
echo "Reloading Caddy configuration..."
docker exec caddy caddy reload --config /etc/caddy/Caddyfile
cd "$CADDY_DIR" && docker compose restart
}
create_caddy_config() {
-8
View File
@@ -1,13 +1,5 @@
#!/bin/bash
wp_cli() {
docker run --rm \
--network container:wordpress_${DOMAIN} \
-v "$(pwd):/var/www/html" \
wordpress:cli-php8.1 \
wp "$@"
}
wpcli() {
docker compose run --rm wpcli "$@"
}