Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ines
Drupal9 skeleton
Commits
09489438
Commit
09489438
authored
Apr 11, 2021
by
Ines WALLON
Browse files
chore: update settings
parent
e73c0719
Pipeline
#812
passed with stage
in 2 minutes and 1 second
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
composer.json
View file @
09489438
{
"name"
:
"drupal
-composer/drupal-project
"
,
"name"
:
"
ines/
drupal
9-skeleton
"
,
"type"
:
"project"
,
"description"
:
"Project template for Drupal 9 projects with composer"
,
"license"
:
"GPL-2.0-or-later"
,
...
...
config/.init_files/exemple.env
View file @
09489438
...
...
@@ -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
...
...
config/drupal/example.settings.local.php
View file @
09489438
...
...
@@ -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'
))
{
...
...
config/drupal/example.settings.php
View file @
09489438
...
...
@@ -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'
;
}
config/drupal/sync/core.extension.yml
View file @
09489438
...
...
@@ -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
...
...
config/drupal/sync/devel.settings.yml
deleted
100644 → 0
View file @
e73c0719
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
config/drupal/sync/devel.toolbar.settings.yml
deleted
100644 → 0
View file @
e73c0719
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
scripts/install.sh
View file @
09489438
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment