From b444c63eaa36088b80dee3cafe07c1fd45ed0b80 Mon Sep 17 00:00:00 2001 From: Jared Trouth Date: Tue, 19 Dec 2023 16:28:49 -0600 Subject: [PATCH] change tag --- .github/workflows/build-and-push.yaml | 2 +- api/config/app.php | 38 +++++++++++---------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 07c39356..68aa9bb9 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -90,4 +90,4 @@ jobs: cache-from: | type=gha build-args: | - BASE_TAG=latest + BASE_TAG=k8s diff --git a/api/config/app.php b/api/config/app.php index d8d530ce..d1ba1405 100755 --- a/api/config/app.php +++ b/api/config/app.php @@ -26,29 +26,23 @@ 'user-registration-module' => \modules\userregistrationmodule\UserRegistrationModule::class, ], 'components' => [ - 'redis' => [ - 'class' => yii\redis\Connection::class, - 'hostname' => App::env('REDIS_HOSTNAME') ?: 'localhost', - 'port' => App::env('REDIS_PORT') ?: 6378, - 'password' => App::env('REDIS_PASSWORD') ?: null, - 'database' => App::env('REDIS_CRAFT_DB') ?: 0, - 'useSSL' => App::env('REDIS_USE_SSL'), - 'contextOptions' => [ - 'ssl' => [ - 'verify_peer' => false, - 'verify_peer_name' => false, - ] - ] + 'cache' => [ + 'class' => yii\caching\MemCache::class, + 'useMemcached' => App::env('ENABLE_MEMCACHED') ?: false, + 'defaultDuration' => 86400, + 'servers' => [ + [ + 'host' => App::env('MEMCACHED_IP'), + 'persistent' => true, + 'port' => App::env('MEMCACHED_PORT') ?: '11211', + 'retryInterval' => 15, + 'status' => true, + 'timeout' => 15, + 'weight' => 1, + ], + ], + 'keyPrefix' => App::env('APP_ID') ?: 'CraftCMS', ], - 'cache' => function() { - $config = [ - 'class' => yii\redis\Cache::class, - 'keyPrefix' => Craft::$app->id, - 'defaultDuration' => Craft::$app->config->general->cacheDuration, - ]; - - return Craft::createObject($config); - } ], 'bootstrap' => ['user-registration-module'], ];