Skip to content

Commit fae77ea

Browse files
Release v6.4.4
1 parent 639be7f commit fae77ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Crypt/Crypter/OpenSSL.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public function init():static {
5757

5858
$this->_is_initialized = true;
5959

60+
// для скриптов добавляем чтение ключа из файла
61+
if (isCli() && file_exists("/run/secrets/compass_database_encryption_secret_key")) {
62+
63+
$secret_key = file_get_contents("/run/secrets/compass_database_encryption_secret_key");
64+
putenv("DATABASE_CRYPT_SECRET_KEY={$secret_key}");
65+
}
66+
6067
if (!is_null($this->_init_fn)) {
6168
$this->_init_fn->call($this);
6269
}

0 commit comments

Comments
 (0)