diff --git a/build/fpm/Dockerfile b/build/fpm/Dockerfile index f2ce8577469d17a28d3d3fca9f7777bc9a78e057..a8d307b0fa33a9b9b765727f7b665cc628060bcb 100644 --- a/build/fpm/Dockerfile +++ b/build/fpm/Dockerfile @@ -28,8 +28,8 @@ RUN apt update && apt install --no-install-recommends -y \ RUN docker-php-ext-configure gd --with-freetype --with-jpeg RUN docker-php-ext-install zip gd pcntl pdo_mysql pdo_pgsql -RUN yes 'y' | pecl install xdebug-3.2.2 igbinary-3.2.14 redis-5.3.7 imagick -RUN docker-php-ext-enable igbinary redis imagick +RUN yes 'y' | pecl install xdebug-3.2.2 igbinary-3.2.14 imagick +RUN docker-php-ext-enable igbinary imagick RUN docker-php-ext-enable --ini-name=xdebug.ini xdebug # Add working dir for the code base diff --git a/metager/composer.json b/metager/composer.json index bb1c7c61786082e83d0ba733476d930a9921280f..82a7929ee4c9f3a3fa508765e7f167180a52ce61 100644 --- a/metager/composer.json +++ b/metager/composer.json @@ -9,19 +9,20 @@ "license": "MIT", "require": { "php": "^8.1", + "endroid/qr-code": "^4.8", + "globalcitizen/php-iban": "^4.1.0", "jenssegers/agent": "^2.6.4", "laravel/framework": "^10.10", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "mcamara/laravel-localization": "1.8.0", - "endroid/qr-code": "^4.8", - "globalcitizen/php-iban": "^4.1.0", "mews/captcha": "^3.3.2", + "mlocati/ip-lib": "^1", + "predis/predis": "^2.2", "promphp/prometheus_client_php": "^2.7.1", "smhg/sepa-qr-data": "^1.2", "symfony/dom-crawler": "^6.0", - "vizir/laravel-keycloak-web-guard": "^3.0", - "mlocati/ip-lib": "^1" + "vizir/laravel-keycloak-web-guard": "^3.0" }, "require-dev": { "barryvdh/laravel-ide-helper": "^2.13", @@ -78,4 +79,4 @@ }, "minimum-stability": "stable", "prefer-stable": true -} \ No newline at end of file +} diff --git a/metager/composer.lock b/metager/composer.lock index a41d7dfd09e7351183f39bca4acdf27a0f8cc340..9b583cc3bfd4dd18d8ee0fa9c5e19bc0132bb848 100644 --- a/metager/composer.lock +++ b/metager/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e6308f92ea6686f20bb0f032324e2c31", + "content-hash": "ef85644697e7d7ba46a43f4a8f57d0c4", "packages": [ { "name": "bacon/bacon-qr-code", @@ -3248,6 +3248,67 @@ ], "time": "2023-11-12T21:59:55+00:00" }, + { + "name": "predis/predis", + "version": "v2.2.2", + "source": { + "type": "git", + "url": "https://github.com/predis/predis.git", + "reference": "b1d3255ed9ad4d7254f9f9bba386c99f4bb983d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/predis/predis/zipball/b1d3255ed9ad4d7254f9f9bba386c99f4bb983d1", + "reference": "b1d3255ed9ad4d7254f9f9bba386c99f4bb983d1", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.3", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^8.0 || ~9.4.4" + }, + "suggest": { + "ext-relay": "Faster connection with in-memory caching (>=0.6.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "Predis\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Till Krüss", + "homepage": "https://till.im", + "role": "Maintainer" + } + ], + "description": "A flexible and feature-complete Redis client for PHP.", + "homepage": "http://github.com/predis/predis", + "keywords": [ + "nosql", + "predis", + "redis" + ], + "support": { + "issues": "https://github.com/predis/predis/issues", + "source": "https://github.com/predis/predis/tree/v2.2.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/tillkruss", + "type": "github" + } + ], + "time": "2023-09-13T16:42:03+00:00" + }, { "name": "promphp/prometheus_client_php", "version": "v2.9.0", diff --git a/metager/config/database.php b/metager/config/database.php index 7a7d1e62bb03df7adfe6f1abff30eca0762defd8..2f9794f7ce950888cba4c284f72564b4f50eff8e 100644 --- a/metager/config/database.php +++ b/metager/config/database.php @@ -122,12 +122,7 @@ return [ 'redis' => [ - 'client' => env('REDIS_CLIENT', 'phpredis'), - - 'options' => [ - 'serializer' => Redis::SERIALIZER_IGBINARY, - 'compression' => Redis::COMPRESSION_ZSTD, - ], + 'client' => env('REDIS_CLIENT', 'predis'), 'default' => [ 'read_write_timeout' => -1, @@ -144,6 +139,23 @@ return [ 'database' => 0, ], + 'sentinel' => [ + [ + 'host' => env('REDIS_SENTINEL_HOST', 'localhost'), + 'port' => env('REDIS_SENTINEL_PORT', 26379), + 'password' => env('REDIS_SENTINEL_PASSWORD', ''), + ], + 'options' => [ + 'service' => env('REDIS_SENTINEL_SERVICE', 'metager'), + 'replication' => 'sentinel', + + 'parameters' => [ + 'password' => env('REDIS_SENTINEL_PASSWORD', ''), + 'database' => 0, + ] + ] + ], + "clusters" => [ 'clustercache' => [ [