Week 1 infrastructure: Docker environments, deploy pipeline, bookstore-core scaffold

Docker Compose environments for dev/staging/production (MariaDB, Redis,
Caddy, Action Scheduler cron sidecar), an idempotent deploy script,
git-hook-based deploy pipeline, backup/restore scripts, and the
bookstore-core plugin stub with WooCommerce HPOS compatibility declared.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-27 09:50:18 -04:00
co-authored by Claude Sonnet 5
commit c9d637c907
23 changed files with 757 additions and 0 deletions
@@ -0,0 +1,22 @@
<?php
/**
* Route outgoing mail to a local catcher outside production, so no test
* email ever reaches a real customer (design doc §01/§08).
*
* Same code in every environment — the only thing that changes is the
* WP_ENVIRONMENT_TYPE define set per-environment in docker-compose.
*/
defined('ABSPATH') || exit;
if (wp_get_environment_type() === 'production') {
return;
}
add_action('phpmailer_init', function ($phpmailer) {
$phpmailer->isSMTP();
$phpmailer->Host = getenv('MAIL_CATCHER_HOST') ?: 'mailhog';
$phpmailer->Port = getenv('MAIL_CATCHER_PORT') ?: 1025;
$phpmailer->SMTPAuth = false;
$phpmailer->SMTPAutoTLS = false;
});