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,19 +4,15 @@ declare(strict_types=1);
namespace App\Framework\Health;
use App\Framework\Cache\Cache;
use App\Framework\Database\DatabaseManager;
use App\Framework\DI\Container;
use App\Framework\DI\Initializer;
use App\Framework\Health\Checks\CacheHealthCheck;
use App\Framework\Health\Checks\DatabaseHealthCheck;
use App\Framework\Health\Checks\DiskSpaceHealthCheck;
use App\Framework\Health\Checks\SystemHealthCheck;
use App\Framework\Discovery\UnifiedDiscoveryService;
final readonly class HealthCheckManagerInitializer
{
public function __construct(
private DatabaseManager $databaseManager,
private Cache $cache
private UnifiedDiscoveryService $discoveryService,
private Container $container
) {
}
@@ -25,22 +21,25 @@ final readonly class HealthCheckManagerInitializer
{
$manager = new HealthCheckManager();
// Register all health checks
$manager->registerHealthCheck(
new DatabaseHealthCheck($this->databaseManager)
// Automatically discover all classes implementing HealthCheckInterface
$healthCheckClasses = $this->discoveryService->findImplementations(
HealthCheckInterface::class
);
$manager->registerHealthCheck(
new CacheHealthCheck($this->cache)
);
// Register each health check via dependency injection
foreach ($healthCheckClasses as $className) {
try {
// Use container to instantiate (handles dependencies automatically)
$healthCheck = $this->container->get($className);
$manager->registerHealthCheck(
new DiskSpaceHealthCheck()
);
$manager->registerHealthCheck(
new SystemHealthCheck()
);
if ($healthCheck instanceof HealthCheckInterface) {
$manager->registerHealthCheck($healthCheck);
}
} catch (\Throwable $e) {
// Log error but continue with other health checks
error_log("Failed to register health check {$className}: " . $e->getMessage());
}
}
return $manager;
}