From fe8f039b5f8698e7b14819f8879a7a4cfd924dc2 Mon Sep 17 00:00:00 2001 From: Konrad Michalik Date: Tue, 3 Mar 2026 12:46:26 +0100 Subject: [PATCH] feat: auto-generate TYPO3 encryption key for feature branch instances --- deployer/feature/task/feature_setup.php | 1 + deployer/typo3/example/deployer/templates/.env.dist | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/deployer/feature/task/feature_setup.php b/deployer/feature/task/feature_setup.php index 484584d..4da408b 100644 --- a/deployer/feature/task/feature_setup.php +++ b/deployer/feature/task/feature_setup.php @@ -95,6 +95,7 @@ function renderRemoteTemplates(): void 'DEPLOYER_CONFIG_FEATURE_NAME' => (string)$feature, 'DEPLOYER_CONFIG_FEATURE_URL' => get('public_urls')[0], 'DEPLOYER_CONFIG_FEATURE_PATH' => $featurePath, + 'DEPLOYER_CONFIG_ENCRYPTION_KEY' => bin2hex(random_bytes(48)), ], $additionalTemplateVariables) ; diff --git a/deployer/typo3/example/deployer/templates/.env.dist b/deployer/typo3/example/deployer/templates/.env.dist index 8d55d70..719f589 100644 --- a/deployer/typo3/example/deployer/templates/.env.dist +++ b/deployer/typo3/example/deployer/templates/.env.dist @@ -24,7 +24,7 @@ TYPO3_CONF_VARS__DB__Connections__Default__user={{DEPLOYER_CONFIG_DATABASE_USER} TYPO3_CONF_VARS__DB__Connections__Default__dbname={{DEPLOYER_CONFIG_DATABASE_NAME}} # Secret Encryption Key -TYPO3_CONF_VARS__SYS__encryptionKey='kjasdf980uhIUOJHgh908DAGUSDHCAG78OSDFHIAypO' +TYPO3_CONF_VARS__SYS__encryptionKey='{{DEPLOYER_CONFIG_ENCRYPTION_KEY}}' # TYPO3s compression is unnecessary and error-prone TYPO3_CONF_VARS__FE__compressionLevel=0