mirror of
https://github.com/10h30/kazewp.git
synced 2026-05-12 15:21:20 +09:00
Update README.md & reload_caddy
This commit is contained in:
@@ -28,8 +28,8 @@ Ensure you have the following installed:
|
|||||||
|
|
||||||
1. **Clone the repository**:
|
1. **Clone the repository**:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/your-username/CaddyWP.git
|
git clone https://github.com/your-username/caddywp.git
|
||||||
cd CaddyWP
|
cd caddywp
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Run the install script**:
|
2. **Run the install script**:
|
||||||
@@ -40,7 +40,9 @@ Ensure you have the following installed:
|
|||||||
## How It Works
|
## How It Works
|
||||||
|
|
||||||
Caddy: Serves as a reverse proxy, automatically obtaining SSL certificates and routing traffic to the correct WordPress container.
|
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.
|
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.
|
MariaDB: A single MariaDB container serves as the database for all WordPress sites. Each site uses a unique database user and password.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ while true; do
|
|||||||
echo "1. Start Caddy:"
|
echo "1. Start Caddy:"
|
||||||
echo " cd ${CADDY_DIR} && docker compose up -d"
|
echo " cd ${CADDY_DIR} && docker compose up -d"
|
||||||
fi
|
fi
|
||||||
|
reload_caddy
|
||||||
echo "2. Start WordPress:"
|
echo "2. Start WordPress:"
|
||||||
echo " cd ${WP_PROJECT_DIR} && docker compose up -d"
|
echo " cd ${WP_PROJECT_DIR} && docker compose up -d"
|
||||||
echo "3. Run the WordPress setup script:"
|
echo "3. Run the WordPress setup script:"
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
reload_caddy() {
|
reload_caddy() {
|
||||||
echo "Reloading Caddy configuration..."
|
echo "Reloading Caddy configuration..."
|
||||||
docker exec caddy caddy reload --config /etc/caddy/Caddyfile
|
cd "$CADDY_DIR" && docker compose restart
|
||||||
}
|
}
|
||||||
|
|
||||||
create_caddy_config() {
|
create_caddy_config() {
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
wp_cli() {
|
|
||||||
docker run --rm \
|
|
||||||
--network container:wordpress_${DOMAIN} \
|
|
||||||
-v "$(pwd):/var/www/html" \
|
|
||||||
wordpress:cli-php8.1 \
|
|
||||||
wp "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
wpcli() {
|
wpcli() {
|
||||||
docker compose run --rm wpcli "$@"
|
docker compose run --rm wpcli "$@"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user