Commit 09489438 authored by Ines WALLON's avatar Ines WALLON
Browse files

chore: update settings

parent e73c0719
Pipeline #812 passed with stage
in 2 minutes and 1 second
{
"name": "drupal-composer/drupal-project",
"name": "ines/drupal9-skeleton",
"type": "project",
"description": "Project template for Drupal 9 projects with composer",
"license": "GPL-2.0-or-later",
......
......@@ -2,8 +2,6 @@ PROJECT_NAME=D9_PROJECT
DRUPAL_SITE_DEFAULT_DOMAIN_1=d9.docker.localhost
DRUPAL_MAIL_DEFAULT_DOMAIN_1=mail.docker.localhost
COMPOSER_AUTH={"github-oauth": {"github.com": "YOUR_GITHUB_TOKEN"}}
SITENAME="Drupal 9"
MAIL=exemple@exemple.com
FIXUID=1000
FIXGID=1000
......
......@@ -14,45 +14,27 @@ $settings["config_sync_directory"] = $app_root . '/' . $site_path . '/../../../c
// Config split.
$config['config_split.config_split.dev']['status'] = FALSE;
$settings['omit_vary_cookie'] = TRUE;
$config['image.settings']['allow_insecure_derivatives'] = TRUE;
$settings['update_free_access'] = FALSE;
$settings['allow_authorize_operations'] = FALSE;
// Performance.
$config['system.performance']['cache']['page']['max_age'] = 86400;
$settings['file_public_path'] = 'sites/default/files';
$config['image.settings']['allow_insecure_derivatives'] = TRUE;
// Trusted host pattern.
$settings['trusted_host_patterns'] = [
'^localhost$',
'^127\.0\.0\.1$',
];
$settings['file_scan_ignore_directories'] = [
'node_modules',
'bower_components',
$environment_trusted_host_patterns = [
'DRUPAL_SITE_DEFAULT_DOMAIN_1',
];
// Redis.
if (getenv('USE_REDIS') === 'True') {
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['redis.connection']['host'] = getenv('REDIS_HOST');
$settings['redis.connection']['port'] = getenv('REDIS_PORT');
$settings['redis.connection']['base'] = getenv('REDIS_DB');
foreach ($environment_trusted_host_patterns as $environment_trusted_host_pattern) {
if (getenv($environment_trusted_host_pattern)) {
$settings['trusted_host_patterns'][] = '^' . getenv($environment_trusted_host_pattern) . '$';
}
}
$settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml';
$settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml';
$settings['cache']['default'] = 'cache.backend.redis';
$settings['hash_salt'] = getenv('HASH_SALT');
// Prevent deletion of orphan files.
// TODO: Remove this line when the following issues will be fixed:
// - https://www.drupal.org/node/2801777
// - https://www.drupal.org/node/2708411
// - https://www.drupal.org/node/1239558
// - https://www.drupal.org/node/2666700
// - https://www.drupal.org/node/2810355
$config['system.file']['temporary_maximum_age'] = 0;
// Performance.
$config['system.performance']['cache']['page']['max_age'] = 86400;
if (getenv('ENVIRONEMENT') === 'dev') {
if (file_exists($app_root . '/' . $site_path . '/../development.settings.php')) {
......
......@@ -8,8 +8,11 @@ $settings['file_scan_ignore_directories'] = [
'node_modules',
'bower_components',
];
$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
$settings['install_profile'] = 'minimal';
$settings['hash_salt'] = getenv('HASH_SALT');
// Prevent deletion of orphan files.
// TODO: Remove this line when the following issues will be fixed:
// - https://www.drupal.org/node/2801777
......@@ -19,10 +22,21 @@ $settings['install_profile'] = 'minimal';
// - https://www.drupal.org/node/2810355
$config['system.file']['temporary_maximum_age'] = 0;
// Redis.
if (getenv('USE_REDIS') === 'True') {
$settings['redis.connection']['interface'] = 'PhpRedis';
$settings['redis.connection']['host'] = getenv('REDIS_HOST');
$settings['redis.connection']['port'] = getenv('REDIS_PORT');
$settings['redis.connection']['base'] = getenv('REDIS_DB');
$settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml';
$settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml';
$settings['cache']['default'] = 'cache.backend.redis';
}
// Fix phpunit create directory.
$settings['file_chmod_directory'] = 02775;
// Performance.
// Custom settings.
if (file_exists($app_root . '/' . $site_path . '/../../../config/drupal/settings.local.php')) {
include $app_root . '/' . $site_path . '/../../../config/drupal/settings.local.php';
}
......@@ -17,7 +17,6 @@ module:
ctools: 0
datetime: 0
dblog: 0
devel: 0
dynamic_page_cache: 0
editor: 0
entity_reference_revisions: 0
......@@ -26,6 +25,7 @@ module:
file: 0
filter: 0
gin_login: 0
gin_toolbar: 0
help: 0
history: 0
image: 0
......
page_alter: false
raw_names: false
error_handlers:
1: 1
rebuild_theme: false
debug_mail_file_format: '%to-%subject-%datetime.mail.txt'
debug_mail_directory: 'temporary://devel-mails'
devel_dumper: default
debug_logfile: 'temporary://drupal_debug.txt'
debug_pre: true
_core:
default_config_hash: Aqx6J0yYT6mVqT0fbjeP4JkoL-700nmudVF5d6Pq2Yo
toolbar_items:
- devel.admin_settings_link
- devel.cache_clear
- devel.container_info.service
- devel.menu_rebuild
- devel.reinstall
- devel.route_info
- devel.run_cron
_core:
default_config_hash: IQjf_ytthngZTAk_MU8-74VecArWD3G5g0oEH6PM6GA
......@@ -21,7 +21,7 @@ drush si minimal \
--account-pass=$ADMIN_PASSWORD \
--account-mail=$ADMIN_MAIL -y \
--existing-config
drush config-set "system.site" name "$SITENAME" -y
drush config-set "system.site" name "$SITE_NAME" -y
chmod 777 -R $WORK_DIR/web/sites/default/files
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment