Skip to content

Commit 9531595

Browse files
Merge pull request #25 from move-elevator/feature/generate-encryption-key
feat: auto-generate TYPO3 encryption key for feature branch instances
2 parents 49a5ff5 + fe8f039 commit 9531595

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

deployer/feature/task/feature_setup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ function renderRemoteTemplates(): void
9595
'DEPLOYER_CONFIG_FEATURE_NAME' => (string)$feature,
9696
'DEPLOYER_CONFIG_FEATURE_URL' => get('public_urls')[0],
9797
'DEPLOYER_CONFIG_FEATURE_PATH' => $featurePath,
98+
'DEPLOYER_CONFIG_ENCRYPTION_KEY' => bin2hex(random_bytes(48)),
9899
],
99100
$additionalTemplateVariables)
100101
;

deployer/typo3/example/deployer/templates/.env.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ TYPO3_CONF_VARS__DB__Connections__Default__user={{DEPLOYER_CONFIG_DATABASE_USER}
2424
TYPO3_CONF_VARS__DB__Connections__Default__dbname={{DEPLOYER_CONFIG_DATABASE_NAME}}
2525

2626
# Secret Encryption Key
27-
TYPO3_CONF_VARS__SYS__encryptionKey='kjasdf980uhIUOJHgh908DAGUSDHCAG78OSDFHIA<BS98ogu>ypO'
27+
TYPO3_CONF_VARS__SYS__encryptionKey='{{DEPLOYER_CONFIG_ENCRYPTION_KEY}}'
2828

2929
# TYPO3s compression is unnecessary and error-prone
3030
TYPO3_CONF_VARS__FE__compressionLevel=0

0 commit comments

Comments
 (0)