feat: CI/CD pipeline setup complete - Ansible playbooks updated, secrets configured, workflow ready

This commit is contained in:
2025-10-31 01:39:24 +01:00
parent 55c04e4fd0
commit e26eb2aa12
601 changed files with 44184 additions and 32477 deletions

View File

@@ -64,10 +64,14 @@ final readonly class AppBootstrapper
// Register MemoryMonitor as singleton
$this->container->singleton(MemoryMonitor::class, $this->memoryMonitor);
// Only log context in development - production doesn't need this noise
$envType = EnvironmentType::fromEnvironment($env);
if ($envType->isDevelopment()) {
// Only log context in development - production doesn't need this noise
//$envType = EnvironmentType::fromEnvironment($env);
//if ($envType->isDevelopment()) {
if($typedConfig->app->type->isDevelopment()) {
// Fehleranzeige für die Entwicklung aktivieren
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
@@ -83,14 +87,6 @@ final readonly class AppBootstrapper
return false;
}, true, true);
register_shutdown_function(function () {
$error = error_get_last();
if ($error !== null) {
echo 'SHUTDOWN ERROR: ' . print_r($error, true);
}
});
}
}
@@ -123,6 +119,9 @@ final readonly class AppBootstrapper
$this->bootstrap();
$this->registerCliErrorHandler();
$ed = $this->container->get(EventDispatcher::class);
$this->container->instance(EventDispatcherInterface::class, $ed);
$consoleOutput = new ConsoleOutput();
$this->container->instance(ConsoleOutput::class, $consoleOutput);
@@ -195,33 +194,19 @@ final readonly class AppBootstrapper
}
/**
* Initialize environment with encryption support
* Initialize environment with smart priority handling
*
* Uses EnvironmentLoader which orchestrates:
* - Docker ENV vars loading (via $_ENV, $_SERVER)
* - .env file loading
* - Smart priority (Production: Docker ENV > .env, Development: .env > Docker ENV)
* - Automatic encryption support for .env.secrets
*/
private function initializeEnvironment(): Environment
{
// First, try to load basic environment to get encryption key
$basicEnv = Environment::fromFile($this->basePath . '/.env');
$encryptionKey = $basicEnv->get('ENCRYPTION_KEY');
$loader = new EncryptedEnvLoader();
// If we have an encryption key, use the encrypted loader
if ($encryptionKey !== null) {
try {
// These dependencies will be resolved later through the container
$randomGenerator = $this->container->get(RandomGenerator::class);
$encryptionFactory = new EncryptionFactory($randomGenerator);
$encryptedLoader = new EncryptedEnvLoader($encryptionFactory, $randomGenerator);
return $encryptedLoader->loadEnvironment($this->basePath, $encryptionKey);
} catch (\Throwable $e) {
// Fallback to basic environment if encryption fails
error_log("Failed to load encrypted environment: " . $e->getMessage());
return $basicEnv;
}
}
// Fallback to basic environment loading
return $basicEnv;
return $loader->load($this->basePath);
}
/**