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

@@ -118,6 +118,138 @@ final class RedisConnection implements RedisConnectionInterface
}
}
public function flush(): void
{
if (! $this->isConnected()) {
$this->reconnect();
}
$this->client->flushDB();
}
public function get(string $key): string|false
{
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->get($key);
}
public function set(string $key, string $value, ?int $ttl = null): bool
{
if (! $this->isConnected()) {
$this->reconnect();
}
if ($ttl === null) {
return $this->client->set($key, $value);
}
return $this->client->setex($key, $ttl, $value);
}
public function delete(string ...$keys): int
{
if (empty($keys)) {
return 0;
}
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->del($keys);
}
public function exists(string ...$keys): int
{
if (empty($keys)) {
return 0;
}
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->exists(...$keys);
}
public function ttl(string $key): int
{
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->ttl($key);
}
public function expire(string $key, int $seconds): bool
{
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->expire($key, $seconds);
}
public function incr(string $key, int $by = 1): int
{
if (! $this->isConnected()) {
$this->reconnect();
}
return $by === 1
? $this->client->incr($key)
: $this->client->incrBy($key, $by);
}
public function decr(string $key, int $by = 1): int
{
if (! $this->isConnected()) {
$this->reconnect();
}
return $by === 1
? $this->client->decr($key)
: $this->client->decrBy($key, $by);
}
public function mGet(array $keys): array
{
if (empty($keys)) {
return [];
}
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->mGet($keys);
}
public function mSet(array $keyValuePairs): bool
{
if (empty($keyValuePairs)) {
return true;
}
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->mSet($keyValuePairs);
}
public function command(string $command, string|int ...$arguments): mixed
{
if (! $this->isConnected()) {
$this->reconnect();
}
return $this->client->rawCommand($command, ...$arguments);
}
/**
* Close the connection when the object is destroyed
*/