feat: add internal WordPress cron runner

This commit is contained in:
bisco
2026-07-23 23:40:44 +02:00
parent f75bce3dea
commit e6ec3c94dc
15 changed files with 245 additions and 24 deletions
+9 -7
View File
@@ -5,9 +5,10 @@
```bash
docker compose up --build -d
docker compose ps
docker compose logs -f proxy wordpress db certbot
docker compose logs -f proxy wordpress wp-cron db certbot
./scripts/prepare-host-volumes.sh
docker compose --profile tools run --rm wp-cli -c 'wp core version'
docker compose --profile tools run --rm wp-cli -c 'wp cron event list'
docker compose down
```
@@ -37,10 +38,11 @@ docker compose restart wordpress proxy
Do not use the maintenance override for routine bootstrap or inspection commands that
do not need outbound network access.
External `wp-cron.php` requests are blocked to reduce public attack surface. If future
content scheduling, maintenance jobs, or plugin features require WordPress cron, run it
from a controlled host/container cron against the private WordPress service instead of
leaving the public trigger enabled.
External `wp-cron.php` requests are blocked to reduce public attack surface. The
default `wp-cron` service runs due scheduled events internally through WP-CLI every
`WP_CRON_INTERVAL_SECONDS` seconds, defaults to 300, and joins only the internal `data`
network. If a scheduled job is late, inspect `docker compose logs wp-cron wordpress db`
and run `docker compose --profile tools run --rm wp-cli -c 'wp cron event list'`.
## Backup and restore
@@ -61,8 +63,8 @@ the database and file volume together, restart, and verify the homepage, media,
owner or mode; run `./scripts/prepare-host-volumes.sh` after changing paths or image
user IDs.
- SMTP is not configured; WordPress password-reset email needs an external mail service.
- WordPress cron is not publicly triggerable; scheduled jobs need an operator-managed
cron runner if that feature becomes necessary.
- WordPress cron is not publicly triggerable; scheduled jobs depend on the internal
`wp-cron` runner being healthy.
- Admin MFA and network allowlisting are deployment concerns and are not bundled.
- WordPress plugins expand the attack surface; install only reviewed, maintained,
necessary plugins.