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

@@ -2,18 +2,18 @@
declare(strict_types=1);
use App\Framework\Queue\Entities\Worker;
use App\Framework\Queue\ValueObjects\WorkerId;
use App\Framework\Queue\ValueObjects\QueueName;
use App\Framework\Core\ValueObjects\Percentage;
use App\Framework\Core\ValueObjects\Byte;
use App\Framework\Core\ValueObjects\Percentage;
use App\Framework\Queue\Entities\Worker;
use App\Framework\Queue\ValueObjects\QueueName;
use App\Framework\Queue\ValueObjects\WorkerId;
describe('Worker Entity', function () {
beforeEach(function () {
$this->workerId = WorkerId::generate();
$this->queues = [
QueueName::defaultQueue(),
QueueName::emailQueue()
QueueName::emailQueue(),
];
$this->capabilities = ['email', 'pdf-generation', 'image-processing'];
});
@@ -40,7 +40,7 @@ describe('Worker Entity', function () {
it('validates worker construction constraints', function () {
// Empty queues
expect(fn() => Worker::register(
expect(fn () => Worker::register(
hostname: 'test-host',
processId: 1001,
queues: [], // Invalid
@@ -48,14 +48,14 @@ describe('Worker Entity', function () {
))->toThrow(\InvalidArgumentException::class, 'Worker must handle at least one queue');
// Invalid max jobs
expect(fn() => Worker::register(
expect(fn () => Worker::register(
hostname: 'test-host',
processId: 1001,
queues: $this->queues,
maxJobs: 0 // Invalid
))->toThrow(\InvalidArgumentException::class, 'Max jobs must be greater than 0');
expect(fn() => Worker::register(
expect(fn () => Worker::register(
hostname: 'test-host',
processId: 1001,
queues: $this->queues,
@@ -72,7 +72,7 @@ describe('Worker Entity', function () {
);
// Negative current jobs should fail during construction
expect(fn() => new Worker(
expect(fn () => new Worker(
id: $worker->id,
hostname: $worker->hostname,
processId: $worker->processId,
@@ -83,7 +83,7 @@ describe('Worker Entity', function () {
))->toThrow(\InvalidArgumentException::class, 'Current jobs cannot be negative');
// Current jobs exceeding max jobs should fail
expect(fn() => new Worker(
expect(fn () => new Worker(
id: $worker->id,
hostname: $worker->hostname,
processId: $worker->processId,
@@ -171,7 +171,7 @@ describe('Worker Entity', function () {
processId: 1001,
queues: [
QueueName::defaultQueue(),
QueueName::emailQueue()
QueueName::emailQueue(),
],
maxJobs: 10
);
@@ -401,7 +401,7 @@ describe('Worker Entity', function () {
'queues' => '["default"]',
'max_jobs' => 5,
'registered_at' => '2024-01-01 12:00:00',
'is_active' => 1
'is_active' => 1,
];
$worker = Worker::fromArray($minimalData);
@@ -417,4 +417,4 @@ describe('Worker Entity', function () {
expect($worker->capabilities)->toBe([]);
expect($worker->version)->toBe('1.0.0');
});
});
});