yorvolabs / canary-bridge-shopware
Shopware 6.6+ plugin bridge for yorvolabs/canary — secure health, cache, and deployment endpoints.
Package info
github.com/yorvolabs/canary-bridge-shopware
Type:shopware-platform-plugin
pkg:composer/yorvolabs/canary-bridge-shopware
Requires
- php: ^8.2
- shopware/core: ^6.6
- yorvolabs/canary: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Shopware 6.6+ plugin that wires yorvolabs/canary into Shopware — providing secure, auditable HTTP endpoints for health monitoring, cache management, and deployment automation, plus a full admin UI dashboard.
Features
- Health probes (
/canary/health/live,/canary/health/ready) — Kubernetes/load balancer ready - Prometheus metrics (
/canary/health/metrics) — OPcache, PHP memory, business KPIs (orders, revenue, customers, carts, newsletter, queue) - Cache management — OPcache reset and Shopware cache pool clearing via API
- Deploy lifecycle — pre-deploy readiness checks, post-deploy verification (OPcache + cache clear + health check), maintenance mode toggle
- Diagnostics — PHP/Shopware runtime info, config validation, log tail (PII-masked), queue depth, plugin list
- Admin UI — full Vue.js dashboard in Shopware Administration (Settings → YorvoLabs Canary) with live health status, Commerce Pulse metrics, log viewer, and tools
- Extensible — add custom health checks, deploy hooks, and diagnostic checks via Symfony service tags
Requirements
- PHP 8.2+
- Shopware 6.6+
Installation
composer require yorvolabs/canary-bridge-shopware bin/console plugin:install --activate YorvoLabsCanary bin/console cache:clear
Quick start
1. Generate tokens for each scope you need:
bin/console canary:token:generate monitoring bin/console canary:token:generate cache bin/console canary:token:generate deploy
2. Configure via environment variables or the admin panel (Settings → YorvoLabs Canary):
CANARY_TOKEN_MONITORING=<your-64-char-token> CANARY_TOKEN_CACHE=<your-64-char-token> CANARY_TOKEN_DEPLOY=<your-64-char-token>
3. Verify:
curl -H "Authorization: Bearer $CANARY_TOKEN_MONITORING" \
https://your-shop.com/canary/health/live
{"ok": true, "data": {"status": "alive"}, "meta": {"request_id": "canary-...", "duration_ms": 1}}
Default endpoints
All endpoints use a configurable prefix (CANARY_ROUTE_PREFIX, default: canary):
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /canary/health/live |
MONITORING | Liveness probe |
| GET | /canary/health/ready |
MONITORING | Readiness probe (all health checks) |
| GET | /canary/health/metrics |
MONITORING | Prometheus/JSON metrics |
| GET | /canary/cache/opcache |
CACHE | OPcache status |
| POST | /canary/cache/opcache/reset?confirm=true |
CACHE | Reset OPcache |
| POST | /canary/cache/shopware |
CACHE | Clear all Shopware cache pools |
| GET | /canary/deploy/pre |
DEPLOY | Pre-deploy readiness check |
| POST | /canary/deploy/post |
DEPLOY | Post-deploy verification |
| PUT/DELETE | /canary/deploy/maintenance |
DEPLOY | Toggle maintenance mode |
| GET | /canary/diag/env |
DIAGNOSTICS | PHP/Shopware runtime info |
| GET | /canary/diag/logs |
DIAGNOSTICS | Tailed application logs |
| GET | /canary/diag/queue |
DIAGNOSTICS | Queue depth + failed messages |
Documentation
Full documentation: github.com/yorvolabs/canary-platform/tree/main/docs
| Page | Description |
|---|---|
| Getting Started | Install, configure, first request |
| API Reference | All endpoints, full request/response shapes |
| Authentication | Token scopes, IP allowlist, security model |
| Configuration | All environment variables and admin config fields |
| Admin UI | Admin panel walkthrough |
| Extending: Health Checks | Custom health checks |
| Extending: Deploy Hooks | Custom pre/post-deploy hooks |
| Extending: Diagnostic Checks | Custom diagnostic checks |
| Deployment Checklist | Pre-production checklist |
| CI/CD Integration | GitHub Actions, GitLab CI, Kubernetes examples |
License
MIT — see LICENSE.