Skip to content

Commit 29b59e7

Browse files
authored
Merge pull request #23 from morpht/39718
mdt-39718: Add services.yml files for Pantheon.
2 parents a80c562 + a818e24 commit 29b59e7

File tree

3 files changed

+265
-0
lines changed

3 files changed

+265
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Rename this file to 'services.pantheon.preproduction.yml' and
3+
# modify to suit. It will then be loaded by settings.pantheon.php
4+
# on any dev or multidev environment (not on 'test' or 'live').
5+
#
6+
# If you would like to define any services or service parameters
7+
# that apply only to production environments ('test' and 'live'),
8+
# you may do so in a 'services.pantheon.production.yml' file.
9+
#
10+
# See 'default.services.yml' for information on useful settings to
11+
# put here.
12+
#
13+
parameters:
14+
http.response.debug_cacheability_headers: true
15+
# Twig debugging settings for explanation of what each option does, see:
16+
# https://www.drupal.org/docs/theming-drupal/twig-in-drupal/debugging-compiled-twig-templates#options
17+
twig.config:
18+
# Html comments for Twig templates: set to true to enable
19+
debug: true
20+
# Automatically compiles the Twig templates when the source code updates
21+
auto_reload: true
22+
services:
23+
cache.backend.null:
24+
class: Drupal\Core\Cache\NullBackendFactory
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
parameters:
2+
# Toggles the super user access policy. If your website has at least one user
3+
# with the Administrator role, it is advised to set this to false. This allows
4+
# you to make user 1 a regular user, strengthening the security of your site.
5+
security.enable_super_user: true
6+
session.storage.options:
7+
# Default ini options for sessions.
8+
#
9+
# Some distributions of Linux (most notably Debian) ship their PHP
10+
# installations with garbage collection (gc) disabled. Since Drupal depends
11+
# on PHP's garbage collection for clearing sessions, ensure that garbage
12+
# collection occurs by using the most common settings.
13+
# @default 1
14+
gc_probability: 1
15+
# @default 100
16+
gc_divisor: 100
17+
#
18+
# Set session lifetime (in seconds), i.e. the grace period for session
19+
# data. Sessions are deleted by the session garbage collector after one
20+
# session lifetime has elapsed since the user's last visit. When a session
21+
# is deleted, authenticated users are logged out, and the contents of the
22+
# user's session is discarded.
23+
# @default 200000
24+
gc_maxlifetime: 200000
25+
#
26+
# Set session cookie lifetime (in seconds), i.e. the time from the session
27+
# is created to the cookie expires, i.e. when the browser is expected to
28+
# discard the cookie. The value 0 means "until the browser is closed".
29+
# @default 2000000
30+
cookie_lifetime: 2000000
31+
#
32+
# Drupal automatically generates a unique session cookie name based on the
33+
# full domain name used to access the site. This mechanism is sufficient
34+
# for most use-cases, including multi-site deployments. However, if it is
35+
# desired that a session can be reused across different subdomains, the
36+
# cookie domain needs to be set to the shared base domain. Doing so assures
37+
# that users remain logged in as they cross between various subdomains.
38+
# To maximize compatibility and normalize the behavior across user agents,
39+
# the cookie domain should start with a dot.
40+
#
41+
# @default none
42+
# cookie_domain: '.example.com'
43+
#
44+
# Set the SameSite cookie attribute: 'None', 'Lax', or 'Strict'. If set,
45+
# this value will override the server value. See
46+
# https://www.php.net/manual/en/session.security.ini.php for more
47+
# information.
48+
# @default no value
49+
cookie_samesite: Lax
50+
#
51+
# Set the session ID string length. The length can be between 22 to 256. The
52+
# PHP recommended value is 48. See
53+
# https://www.php.net/manual/session.security.ini.php for more information.
54+
# This value should be kept in sync with
55+
# \Drupal\Core\Session\SessionConfiguration::__construct()
56+
# @default 48
57+
sid_length: 48
58+
#
59+
# Set the number of bits in encoded session ID character. The possible
60+
# values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-",
61+
# ","). The PHP recommended value is 6. See
62+
# https://www.php.net/manual/session.security.ini.php for more information.
63+
# This value should be kept in sync with
64+
# \Drupal\Core\Session\SessionConfiguration::__construct()
65+
# @default 6
66+
sid_bits_per_character: 6
67+
# By default, Drupal generates a session cookie name based on the full
68+
# domain name. Set the name_suffix to a short random string to ensure this
69+
# session cookie name is unique on different installations on the same
70+
# domain and path (for example, when migrating from Drupal 7).
71+
name_suffix: ''
72+
twig.config:
73+
# Twig debugging:
74+
#
75+
# When debugging is enabled:
76+
# - The markup of each Twig template is surrounded by HTML comments that
77+
# contain theming information, such as template file name suggestions.
78+
# - Note that this debugging markup will cause automated tests that directly
79+
# check rendered HTML to fail. When running automated tests, 'debug'
80+
# should be set to FALSE.
81+
# - The dump() function can be used in Twig templates to output information
82+
# about template variables.
83+
# - Twig templates are automatically recompiled whenever the source code
84+
# changes (see auto_reload below).
85+
#
86+
# For more information about debugging Twig templates, see
87+
# https://www.drupal.org/node/1906392.
88+
#
89+
# Enabling Twig debugging is not recommended in production environments.
90+
# @default false
91+
debug: false
92+
# Twig auto-reload:
93+
#
94+
# Automatically recompile Twig templates whenever the source code changes.
95+
# If you don't provide a value for auto_reload, it will be determined
96+
# based on the value of debug.
97+
#
98+
# Enabling auto-reload is not recommended in production environments.
99+
# @default null
100+
auto_reload: null
101+
# Twig cache:
102+
#
103+
# By default, Twig templates will be compiled and stored in the filesystem
104+
# to increase performance. Disabling the Twig cache will recompile the
105+
# templates from source each time they are used. In most cases the
106+
# auto_reload setting above should be enabled rather than disabling the
107+
# Twig cache.
108+
#
109+
# Disabling the Twig cache is not recommended in production environments.
110+
# @default true
111+
cache: true
112+
# File extensions:
113+
#
114+
# List of file extensions the Twig system is allowed to load via the
115+
# twig.loader.filesystem service. Files with other extensions will not be
116+
# loaded unless they are added here. For example, to allow a file named
117+
# 'example.partial' to be loaded, add 'partial' to this list. To load files
118+
# with no extension, add an empty string '' to the list.
119+
#
120+
# @default ['css', 'html', 'js', 'svg', 'twig']
121+
allowed_file_extensions:
122+
- css
123+
- html
124+
- js
125+
- svg
126+
- twig
127+
renderer.config:
128+
# Renderer required cache contexts:
129+
#
130+
# The Renderer will automatically associate these cache contexts with every
131+
# render array, hence varying every render array by these cache contexts.
132+
#
133+
# @default ['languages:language_interface', 'theme', 'user.permissions']
134+
required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
135+
# Renderer automatic placeholdering conditions:
136+
#
137+
# Drupal allows portions of the page to be automatically deferred when
138+
# rendering to improve cache performance. That is especially helpful for
139+
# cache contexts that vary widely, such as the active user. On some sites
140+
# those may be different, however, such as sites with only a handful of
141+
# users. If you know what the high-cardinality cache contexts are for your
142+
# site, specify those here. If you're not sure, the defaults are fairly safe
143+
# in general.
144+
#
145+
# For more information about rendering optimizations see
146+
# https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
147+
auto_placeholder_conditions:
148+
# Max-age at or below which caching is not considered worthwhile.
149+
#
150+
# Disable by setting to -1.
151+
#
152+
# @default 0
153+
max-age: 0
154+
# Cache contexts with a high cardinality.
155+
#
156+
# Disable by setting to [].
157+
#
158+
# @default ['session', 'user']
159+
contexts: ['session', 'user']
160+
# Tags with a high invalidation frequency.
161+
#
162+
# Disable by setting to [].
163+
#
164+
# @default []
165+
tags: []
166+
# Renderer cache debug:
167+
#
168+
# Allows cache debugging output for each rendered element.
169+
#
170+
# Enabling render cache debugging is not recommended in production
171+
# environments.
172+
# @default false
173+
debug: false
174+
# Cacheability debugging:
175+
#
176+
# Responses with cacheability metadata (CacheableResponseInterface instances)
177+
# get X-Drupal-Cache-Tags, X-Drupal-Cache-Contexts and X-Drupal-Cache-Max-Age
178+
# headers.
179+
#
180+
# For more information about debugging cacheable responses, see
181+
# https://www.drupal.org/developing/api/8/response/cacheable-response-interface
182+
#
183+
# Enabling cacheability debugging is not recommended in production
184+
# environments.
185+
# @default false
186+
http.response.debug_cacheability_headers: false
187+
factory.keyvalue: {}
188+
# Default key/value storage service to use.
189+
# @default keyvalue.database
190+
# default: keyvalue.database
191+
# Collection-specific overrides.
192+
# state: keyvalue.database
193+
factory.keyvalue.expirable: {}
194+
# Default key/value expirable storage service to use.
195+
# @default keyvalue.database.expirable
196+
# default: keyvalue.database.expirable
197+
# Allowed protocols for URL generation.
198+
filter_protocols:
199+
- http
200+
- https
201+
- ftp
202+
- news
203+
- nntp
204+
- tel
205+
- telnet
206+
- mailto
207+
- irc
208+
- ssh
209+
- sftp
210+
- webcal
211+
- rtsp
212+
213+
# Configure Cross-Site HTTP requests (CORS).
214+
# Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
215+
# for more information about the topic in general.
216+
# Note: By default the configuration is disabled.
217+
cors.config:
218+
enabled: false
219+
# Specify allowed headers, like 'x-allowed-header'.
220+
allowedHeaders: []
221+
# Specify allowed request methods, specify ['*'] to allow all possible ones.
222+
allowedMethods: []
223+
# Configure requests allowed from specific origins. Do not include trailing
224+
# slashes with URLs.
225+
allowedOrigins: ['*']
226+
# Configure requests allowed from origins, matching against regex patterns.
227+
allowedOriginsPatterns: []
228+
# Sets the Access-Control-Expose-Headers header.
229+
exposedHeaders: false
230+
# Sets the Access-Control-Max-Age header.
231+
maxAge: false
232+
# Sets the Access-Control-Allow-Credentials header.
233+
supportsCredentials: false
234+
235+
queue.config:
236+
# The maximum number of seconds to wait if a queue is temporarily suspended.
237+
# This is not applicable when a queue is suspended but does not specify
238+
# how long to wait before attempting to resume.
239+
suspendMaximumWait: 30

composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"overwrite": false
3232
},
3333
"[web-root]/sites/default/settings/settings.pantheon.php": "assets/pantheon/settings.pantheon.php",
34+
"[web-root]/sites/default/settings/pantheon-preproduction-services.yml": "assets/pantheon/pantheon-preproduction-services.yml",
35+
"[web-root]/sites/default/settings/pantheon-production-services.yml": "assets/pantheon/pantheon-production-services.yml",
3436
"[web-root]/sites/default/settings/settings.main.php": "assets/drupal10/settings.main.php",
3537
"[web-root]/sites/default/settings/settings.dev.php": "assets/drupal10/settings.dev.php",
3638
"[web-root]/sites/default/settings/settings.lando.php": "assets/drupal10/settings.lando.php",

0 commit comments

Comments
 (0)