Skip to content
Snippets Groups Projects
Verified Commit 2f867e12 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Make database credentials available in the .env.local file and use them...

[TASK] Make database credentials available in the .env.local file and use them in environment.php in TYPO3 projects
parent 4ae53402
No related branches found
No related tags found
No related merge requests found
......@@ -702,7 +702,7 @@ if node['normal_site']['configure_typo3']
end
template "#{node['normal_site']['webroot']}/#{base_hostname}/config/system/environment.php" do
source 'typo3/SiteConfiguration.php.erb'
source 'typo3/environment.php.erb'
mode '0660'
end
......
TYPO3_CONTEXT=Development/Local
SOLR_HOST=solr:password@localhost
SOLR_PORT=8983
\ No newline at end of file
SOLR_PORT=8983
DATABASE_USER=typo3
DATABASE_PASSWORD=typo3
DATABASE_HOST=127.0.0.1
DATABASE_PORT=3306
DATABASE_NAME=typo3
\ No newline at end of file
<?php
if (!isset($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'])) {
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections'] = [];
}
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] = [
'charset' => 'utf8mb4',
'dbname' => getenv('DATABASE_NAME'),
'driver' => 'mysqli',
'host' => getenv('DATABASE_HOST'),
'password' => getenv('DATABASE_PASSWORD'),
'port' => getenv('DATABASE_PORT'),
'user' => getenv('DATABASE_USER'),
'initCommands' => 'SET SESSION sql_mode=\'\'',
'persistentConnection' => FALSE,
'tableoptions' => [
'charset' => 'utf8mb4',
'collate' => 'utf8mb4_unicode_ci',
],
];
// SSL settings for the backend login
//
// Relevant Values:
// - 2 - Enforce SSL
// - 0 - Allow any
$GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] = 2;
// Change install tool password to joh316
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$P$CCuX8EzzYaSOHJS5o32X9Uk3Vg79ji1';
// enable logs in general
//$GLOBALS['TYPO3_CONF_VARS']['enableLogs'] = TRUE;
// customize the solr log if required
//$GLOBALS['TYPO3_CONF_VARS']['LOG']['ApacheSolrForTypo3']['Solr']['writerConfiguration'] = [
// // or DEBUG | INFO
// \TYPO3\CMS\Core\Log\LogLevel::INFO => [
// 'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
// 'logFile' => 'typo3temp/var/logs/solr.log'
// ]
// ],
//];
// Vagrant specific stuff (if your user has another main group id than 1000, especially required on MacOSX)
$GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = 'vagrant';
// Disable MFA and IPmaskList
$GLOBALS['TYPO3_CONF_VARS']['BE']['requireMfa'] = 0;
$GLOBALS['TYPO3_CONF_VARS']['BE']['IPmaskList'] = '';
// Mail configuration for vagrant machines
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = 'smtp';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_sendmail_command'] = '';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt'] = false;
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_password'] = '';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server'] = 'localhost:1025';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username'] = '';
/*
$paidExtensionKeys = [
'sg_account',
'sg_comments',
'sg_mail',
'sg_news'
];
foreach($paidExtensionKeys as $extensionKey) {
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extensionKey])) {
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS'][$extensionKey]['key'] = 'XXXXXX-XXXXXX-XXXXXX-XXXXXX';
}
}
*/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment