feat(Production): Complete production deployment infrastructure

- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
This commit is contained in:
2025-10-25 19:18:37 +02:00
parent caa85db796
commit fc3d7e6357
83016 changed files with 378904 additions and 20919 deletions

View File

@@ -4,12 +4,12 @@ declare(strict_types=1);
namespace App\Framework\Queue\Wrappers;
use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Queue\Queue;
use App\Framework\Queue\RetryStrategyHelper;
use App\Framework\Queue\ValueObjects\JobMetadata;
use App\Framework\Queue\ValueObjects\JobPayload;
use App\Framework\Queue\ValueObjects\QueuePriority;
use App\Framework\Queue\ValueObjects\JobMetadata;
use App\Framework\Queue\RetryStrategyHelper;
use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Retry\RetryStrategy;
/**
@@ -21,7 +21,8 @@ final readonly class CommandQueue
{
public function __construct(
private Queue $queue
) {}
) {
}
/**
* Push any object as a command
@@ -109,6 +110,7 @@ final readonly class CommandQueue
public function popCommand(): ?object
{
$payload = $this->queue->pop();
return $payload?->job;
}
@@ -120,6 +122,7 @@ final readonly class CommandQueue
public function peekCommand(): ?object
{
$payload = $this->queue->peek();
return $payload?->job;
}
@@ -170,7 +173,7 @@ final readonly class CommandQueue
'type' => 'command',
'size' => $this->size(),
'is_empty' => $this->isEmpty(),
...$stats
...$stats,
];
}
@@ -209,4 +212,4 @@ final readonly class CommandQueue
return $commands;
}
}
}

View File

@@ -4,12 +4,12 @@ declare(strict_types=1);
namespace App\Framework\Queue\Wrappers;
use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Queue\Queue;
use App\Framework\Queue\RetryStrategyHelper;
use App\Framework\Queue\ValueObjects\JobMetadata;
use App\Framework\Queue\ValueObjects\JobPayload;
use App\Framework\Queue\ValueObjects\QueuePriority;
use App\Framework\Queue\ValueObjects\JobMetadata;
use App\Framework\Queue\RetryStrategyHelper;
use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Retry\RetryStrategy;
/**
@@ -22,7 +22,8 @@ final readonly class EmailQueue
{
public function __construct(
private Queue $queue
) {}
) {
}
/**
* Push any object as an email job
@@ -166,6 +167,7 @@ final readonly class EmailQueue
public function popEmail(): ?object
{
$payload = $this->queue->pop();
return $payload?->job;
}
@@ -177,6 +179,7 @@ final readonly class EmailQueue
public function peekEmail(): ?object
{
$payload = $this->queue->peek();
return $payload?->job;
}
@@ -227,7 +230,7 @@ final readonly class EmailQueue
'type' => 'email',
'size' => $this->size(),
'is_empty' => $this->isEmpty(),
...$stats
...$stats,
];
}
@@ -291,7 +294,7 @@ final readonly class EmailQueue
$tempEmails = [];
// Pop all emails temporarily
while (!$this->isEmpty()) {
while (! $this->isEmpty()) {
$payload = $this->popEmailWithMetadata();
if ($payload === null) {
break;
@@ -320,6 +323,7 @@ final readonly class EmailQueue
public function getEmailCountByPriority(): array
{
$stats = $this->getStats();
return $stats['priority_breakdown'] ?? [];
}
@@ -334,7 +338,7 @@ final readonly class EmailQueue
$tempEmails = [];
// Pop all emails temporarily
while (!$this->isEmpty()) {
while (! $this->isEmpty()) {
$payload = $this->popEmailWithMetadata();
if ($payload === null) {
break;
@@ -365,7 +369,7 @@ final readonly class EmailQueue
return [
'pending' => $this->size(),
'scheduled' => count($this->getScheduledEmails()),
'immediate' => $this->size() - count($this->getScheduledEmails())
'immediate' => $this->size() - count($this->getScheduledEmails()),
];
}
@@ -416,4 +420,4 @@ final readonly class EmailQueue
$this->pushNotificationEmail($email);
}
}
}
}

View File

@@ -4,12 +4,12 @@ declare(strict_types=1);
namespace App\Framework\Queue\Wrappers;
use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Queue\Queue;
use App\Framework\Queue\RetryStrategyHelper;
use App\Framework\Queue\ValueObjects\JobMetadata;
use App\Framework\Queue\ValueObjects\JobPayload;
use App\Framework\Queue\ValueObjects\QueuePriority;
use App\Framework\Queue\ValueObjects\JobMetadata;
use App\Framework\Queue\RetryStrategyHelper;
use App\Framework\Core\ValueObjects\Duration;
use App\Framework\Retry\RetryStrategy;
/**
@@ -22,7 +22,8 @@ final readonly class EventQueue
{
public function __construct(
private Queue $queue
) {}
) {
}
/**
* Push any object as an event
@@ -138,6 +139,7 @@ final readonly class EventQueue
public function popEvent(): ?object
{
$payload = $this->queue->pop();
return $payload?->job;
}
@@ -149,6 +151,7 @@ final readonly class EventQueue
public function peekEvent(): ?object
{
$payload = $this->queue->peek();
return $payload?->job;
}
@@ -199,7 +202,7 @@ final readonly class EventQueue
'type' => 'event',
'size' => $this->size(),
'is_empty' => $this->isEmpty(),
...$stats
...$stats,
];
}
@@ -263,7 +266,7 @@ final readonly class EventQueue
$tempEvents = [];
// Pop all events temporarily
while (!$this->isEmpty()) {
while (! $this->isEmpty()) {
$payload = $this->popEventWithMetadata();
if ($payload === null) {
break;
@@ -292,6 +295,7 @@ final readonly class EventQueue
public function getEventCountByPriority(): array
{
$stats = $this->getStats();
return $stats['priority_breakdown'] ?? [];
}
@@ -318,4 +322,4 @@ final readonly class EventQueue
$this->pushSystemEvent($event);
}
}
}
}