From 2534e816681cbe0bb7f3b758aa745332c1754699 Mon Sep 17 00:00:00 2001
From: Marine Gandy
Date: Fri, 2 Aug 2024 18:23:26 +0200
Subject: [PATCH] init Drupal 11 template
---
project/drupal.py | 43 +
templates/drupal11/.platform.template.yaml | 34 +
templates/drupal11/files/.blackfire.yml | 81 ++
templates/drupal11/files/.environment | 11 +
.../.github/ISSUE_TEMPLATE/bug_report.yaml | 72 ++
.../files/.github/ISSUE_TEMPLATE/config.yaml | 8 +
.../.github/ISSUE_TEMPLATE/improvements.yaml | 41 +
.../files/.github/PULL_REQUEST_TEMPLATE.md | 34 +
.../files/.github/tests/vrt/template-paths.js | 54 ++
.../files/.github/workflows/autopr.yaml | 23 +
.../.github/workflows/post-pr-acceptance.yaml | 20 +
.../.github/workflows/project-issues.yaml | 20 +
.../files/.github/workflows/sourceops.yaml | 20 +
.../.github/workflows/testprenvironment.yaml | 32 +
.../.github/workflows/workflow-fail-log.yaml | 42 +
templates/drupal11/files/.gitignore | 34 +
templates/drupal11/files/.platform.app.yaml | 203 +++++
.../drupal11/files/.platform/local/.gitignore | 1 +
.../drupal11/files/.platform/local/README.txt | 8 +
.../files/.platform/local/project.yaml | 2 +
.../drupal11/files/.platform/routes.yaml | 17 +
.../drupal11/files/.platform/services.yaml | 11 +
templates/drupal11/files/README.md | 832 +++++++++++++++++
templates/drupal11/files/composer.json | 98 ++
templates/drupal11/files/config/sync/.gitkeep | 0
.../files/drush/platformsh_deploy_drupal.sh | 19 +
.../drush/platformsh_generate_drush_yml.php | 80 ++
templates/drupal11/files/header.svg | 5 +
templates/drupal11/files/php.ini | 14 +
templates/drupal11/files/web/.csslintrc | 40 +
templates/drupal11/files/web/.eslintignore | 8 +
templates/drupal11/files/web/.eslintrc.json | 3 +
templates/drupal11/files/web/.gitignore | 1 +
templates/drupal11/files/web/.ht.router.php | 71 ++
templates/drupal11/files/web/.htaccess | 180 ++++
templates/drupal11/files/web/INSTALL.txt | 3 +
templates/drupal11/files/web/README.md | 75 ++
.../drupal11/files/web/example.gitignore | 42 +
templates/drupal11/files/web/index.php | 22 +
.../drupal11/files/web/modules/README.txt | 42 +
.../drupal11/files/web/profiles/README.txt | 28 +
templates/drupal11/files/web/robots.txt | 65 ++
templates/drupal11/files/web/sites/README.txt | 10 +
.../web/sites/default/default.services.yml | 215 +++++
.../web/sites/default/default.settings.php | 834 ++++++++++++++++++
.../files/web/sites/default/settings.php | 38 +
.../web/sites/default/settings.platformsh.php | 170 ++++
.../files/web/sites/development.services.yml | 9 +
.../web/sites/example.settings.local.php | 155 ++++
.../files/web/sites/example.sites.php | 57 ++
.../drupal11/files/web/themes/README.txt | 31 +
templates/drupal11/files/web/update.php | 30 +
templates/drupal11/files/web/web.config | 91 ++
templates/drupal11/info/info.yaml | 93 ++
templates/drupal11/info/local_nextjs.md | 24 +
templates/drupal11/info/post_install.md | 3 +
templates/drupal11/platformsh.wizard.yaml | 89 ++
57 files changed, 4288 insertions(+)
create mode 100644 templates/drupal11/.platform.template.yaml
create mode 100644 templates/drupal11/files/.blackfire.yml
create mode 100644 templates/drupal11/files/.environment
create mode 100644 templates/drupal11/files/.github/ISSUE_TEMPLATE/bug_report.yaml
create mode 100644 templates/drupal11/files/.github/ISSUE_TEMPLATE/config.yaml
create mode 100644 templates/drupal11/files/.github/ISSUE_TEMPLATE/improvements.yaml
create mode 100644 templates/drupal11/files/.github/PULL_REQUEST_TEMPLATE.md
create mode 100644 templates/drupal11/files/.github/tests/vrt/template-paths.js
create mode 100644 templates/drupal11/files/.github/workflows/autopr.yaml
create mode 100644 templates/drupal11/files/.github/workflows/post-pr-acceptance.yaml
create mode 100644 templates/drupal11/files/.github/workflows/project-issues.yaml
create mode 100644 templates/drupal11/files/.github/workflows/sourceops.yaml
create mode 100644 templates/drupal11/files/.github/workflows/testprenvironment.yaml
create mode 100644 templates/drupal11/files/.github/workflows/workflow-fail-log.yaml
create mode 100644 templates/drupal11/files/.gitignore
create mode 100644 templates/drupal11/files/.platform.app.yaml
create mode 100644 templates/drupal11/files/.platform/local/.gitignore
create mode 100644 templates/drupal11/files/.platform/local/README.txt
create mode 100644 templates/drupal11/files/.platform/local/project.yaml
create mode 100644 templates/drupal11/files/.platform/routes.yaml
create mode 100644 templates/drupal11/files/.platform/services.yaml
create mode 100644 templates/drupal11/files/README.md
create mode 100644 templates/drupal11/files/composer.json
create mode 100644 templates/drupal11/files/config/sync/.gitkeep
create mode 100755 templates/drupal11/files/drush/platformsh_deploy_drupal.sh
create mode 100644 templates/drupal11/files/drush/platformsh_generate_drush_yml.php
create mode 100644 templates/drupal11/files/header.svg
create mode 100644 templates/drupal11/files/php.ini
create mode 100644 templates/drupal11/files/web/.csslintrc
create mode 100644 templates/drupal11/files/web/.eslintignore
create mode 100644 templates/drupal11/files/web/.eslintrc.json
create mode 100644 templates/drupal11/files/web/.gitignore
create mode 100644 templates/drupal11/files/web/.ht.router.php
create mode 100644 templates/drupal11/files/web/.htaccess
create mode 100644 templates/drupal11/files/web/INSTALL.txt
create mode 100644 templates/drupal11/files/web/README.md
create mode 100644 templates/drupal11/files/web/example.gitignore
create mode 100644 templates/drupal11/files/web/index.php
create mode 100644 templates/drupal11/files/web/modules/README.txt
create mode 100644 templates/drupal11/files/web/profiles/README.txt
create mode 100644 templates/drupal11/files/web/robots.txt
create mode 100644 templates/drupal11/files/web/sites/README.txt
create mode 100644 templates/drupal11/files/web/sites/default/default.services.yml
create mode 100644 templates/drupal11/files/web/sites/default/default.settings.php
create mode 100644 templates/drupal11/files/web/sites/default/settings.php
create mode 100644 templates/drupal11/files/web/sites/default/settings.platformsh.php
create mode 100644 templates/drupal11/files/web/sites/development.services.yml
create mode 100644 templates/drupal11/files/web/sites/example.settings.local.php
create mode 100644 templates/drupal11/files/web/sites/example.sites.php
create mode 100644 templates/drupal11/files/web/themes/README.txt
create mode 100644 templates/drupal11/files/web/update.php
create mode 100644 templates/drupal11/files/web/web.config
create mode 100644 templates/drupal11/info/info.yaml
create mode 100644 templates/drupal11/info/local_nextjs.md
create mode 100644 templates/drupal11/info/post_install.md
create mode 100644 templates/drupal11/platformsh.wizard.yaml
diff --git a/project/drupal.py b/project/drupal.py
index 192869370..3c4c68bef 100644
--- a/project/drupal.py
+++ b/project/drupal.py
@@ -228,3 +228,46 @@ def platformify(self):
self.builddir) + self.composer_defaults(),
]
+class Drupal11(RemoteProject):
+ major_version = "11.0"
+ remote = 'https://github.com/drupal/recommended-project.git'
+
+ def package_update_actions(self):
+ actions = super(Drupal11, self).package_update_actions()
+ return [
+ 'cd {0} && composer config -g allow-plugins.composer/installers true --no-plugins'.format(
+ self.builddir),
+ 'cd {0} && composer config allow-plugins.composer/installers true --no-plugins'.format(
+ self.builddir),
+ 'cd {0} && composer config allow-plugins.drupal/core-composer-scaffold true --no-plugins'.format(
+ self.builddir),
+ 'cd {0} && composer config allow-plugins.drupal/core-project-message true --no-plugins'.format(
+ self.builddir),
+ 'cd {0} && composer config allow-plugins.cweagans/composer-patches true --no-plugins '.format(
+ self.builddir),
+ ] + actions
+
+ @property
+ def update(self):
+ projectName = "drupal11"
+
+ def drupal11_modify_composer(composer):
+ """
+ This change makes the template loadable via Composer (see https://github.com/platformsh-templates/drupal9/pull/33).
+ """
+
+ composer['name'] = "platformsh/{0}".format(projectName)
+ composer['description'] = "This template builds Drupal 11 for Platform.sh based the \"Drupal Recommended\" Composer project."
+
+ return composer
+
+ return super(Drupal11, self).update + [
+ (self.modify_composer, [drupal11_modify_composer])
+ ]
+
+ @property
+ def platformify(self):
+ return super(Drupal11, self).platformify + [
+ 'cd {0} && composer require platformsh/config-reader drush/drush'.format(
+ self.builddir) + self.composer_defaults(),
+ ]
diff --git a/templates/drupal11/.platform.template.yaml b/templates/drupal11/.platform.template.yaml
new file mode 100644
index 000000000..0dd71337e
--- /dev/null
+++ b/templates/drupal11/.platform.template.yaml
@@ -0,0 +1,34 @@
+version: 1
+
+info:
+ id: platformsh/drupal11
+ name: Drupal 11
+ description: |
+ This template builds Drupal 11 using the "Drupal Recommended" Composer project. It is pre-configured to use MariaDB and Redis for caching. The Drupal installer will skip asking for database credentials as they are already provided.
+ Drupal is a flexible and extensible PHP-based CMS framework.
+
+ class: starter
+ featured: true
+ tags:
+ - PHP
+ - Drupal
+ - CMS
+ - Symfony
+ related_blog_tags:
+ - Drupal
+ image: data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='186.52541' height='243.71308' viewBox='0 0 186.52541 243.71308'%3E%3Ctitle%3ERisorsa 85%3C/title%3E%3Cg id='Livello_2' data-name='Livello 2'%3E%3Cg id='Livello_1-2' data-name='Livello 1'%3E%3Cpath d='M131.64024,51.90954C114.49124,34.76866,98.12945,18.42858,93.26,0,88.39024,18.42858,72.02583,34.76866,54.8797,51.90954,29.16037,77.61263,0,106.7432,0,150.434a93.26271,93.26271,0,1,0,186.52541,0c0-43.688-29.158-72.8214-54.88517-98.52449M39.63956,172.16578c-5.71847-.19418-26.82308-36.57089,12.32937-75.303l25.90873,28.30088a2.21467,2.21467,0,0,1-.173,3.30485c-6.18245,6.34085-32.53369,32.7658-35.809,41.90292-.676,1.886-1.66339,1.81463-2.25619,1.79436M93.26283,220.1092a32.07521,32.07521,0,0,1-32.07544-32.07543A33.42322,33.42322,0,0,1,69.1821,166.8471c5.7836-7.07224,24.07643-26.96358,24.07643-26.96358s18.01279,20.18332,24.03326,26.89607a31.36794,31.36794,0,0,1,8.04647,21.25418A32.07551,32.07551,0,0,1,93.26283,220.1092m61.3923-52.015c-.69131,1.51192-2.25954,4.036-4.37617,4.113-3.77288.13741-4.176-1.79579-6.96465-5.92291-6.12235-9.06007-59.55167-64.89991-69.54517-75.69925-8.79026-9.49851-1.23783-16.195,2.26549-19.70431C80.42989,66.47768,93.25949,53.656,93.25949,53.656s38.25479,36.29607,54.19029,61.09626,10.44364,46.26024,7.20535,53.342' style='fill:%23009cde'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E
+ notes:
+ - heading: "Features"
+ content: |
+ PHP 8.3
+ MariaDB 10.6
+ Redis 7.2
+ Drush included
+ Automatic TLS certificates
+ Composer-based build
+
+initialize:
+ repository: https://github.com/platformsh-templates/drupal11.git@master
+ config: null
+ files: []
+ profile: Drupal 11
diff --git a/templates/drupal11/files/.blackfire.yml b/templates/drupal11/files/.blackfire.yml
new file mode 100644
index 000000000..78f90ecd4
--- /dev/null
+++ b/templates/drupal11/files/.blackfire.yml
@@ -0,0 +1,81 @@
+tests:
+ 'The homepage should be fast':
+ path:
+ - '/'
+ assertions:
+ - 'main.wall_time <= 250ms'
+ 'Some Composer dependencies have known security issues and should be upgraded':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'not has_vulnerable_dependencies()' }
+ '"assert.active" is a dev_only feature and should be disabled in production':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'runtime.configuration.assert_active === false' }
+ '"display_errors" should be disabled':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'not is_configuration_enabled("display_errors")' }
+ '"display_startup_errors" should not be enabled':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'not is_configuration_enabled("display_startup_errors")' }
+ '"max_execution_time" should be less than 30 seconds for Web requests':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'runtime.configuration.max_execution_time <= 30' }
+ '"session.use_strict_mode" should be enabled':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'runtime.configuration.session_use_strict_mode === true' }
+ '"zend.detect_unicode" should be disabled as BOMs are not portable':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'runtime.configuration.zend_detect_unicode === false' }
+ 'The realpath cache ttl should be more than one hour in production':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'runtime.configuration.realpath_cache_ttl >= 3600' }
+ 'The session garbage collector should be disabled in production':
+ path:
+ - '/.*'
+ assertions:
+ - { expression: 'runtime.configuration.session_gc_probability === 0' }
+
+scenarios: |
+ #!blackfire-player
+
+ name "Drupal Scenarios"
+
+ group homepages
+ visit url("/")
+ name "Homepage (English)"
+ expect status_code() == 200
+ visit url("/es")
+ name "Homepage (Español)"
+ expect status_code() == 200
+
+ group articles
+ visit url("/en/articles")
+ name "Articles"
+ expect status_code() == 200
+
+ group admin_anonymous
+ visit url("/en/admin/content")
+ expect status_code() == 403
+ visit url("/en/admin/structure")
+ expect status_code() == 403
+
+ scenario
+ name "Anonymous Visit"
+ include homepages
+ include articles
+ include admin_anonymous
diff --git a/templates/drupal11/files/.environment b/templates/drupal11/files/.environment
new file mode 100644
index 000000000..4e0ee3cb3
--- /dev/null
+++ b/templates/drupal11/files/.environment
@@ -0,0 +1,11 @@
+export RELATIONSHIPS_JSON="$(echo $PLATFORM_RELATIONSHIPS | base64 --decode)"
+
+# Set database environment variables
+export DB_HOST="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].host')"
+export DB_PORT="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].port')"
+export DB_PATH="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].path')"
+export DB_DATABASE="$DB_PATH"
+export DB_USERNAME="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].username')"
+export DB_PASSWORD="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].password')"
+export DB_SCHEME="$(echo $RELATIONSHIPS_JSON | jq -r '.mariadb[0].scheme')"
+export DATABASE_URL="${DB_SCHEME}://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_PATH}"
\ No newline at end of file
diff --git a/templates/drupal11/files/.github/ISSUE_TEMPLATE/bug_report.yaml b/templates/drupal11/files/.github/ISSUE_TEMPLATE/bug_report.yaml
new file mode 100644
index 000000000..604f31cd2
--- /dev/null
+++ b/templates/drupal11/files/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -0,0 +1,72 @@
+name: Bug report
+description: If you've found a problem with the template, let us know so that we can update it for everyone.
+labels:
+ - 'bug'
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for your interest in helping improve the Platform.sh templates!
+ Please fill in the fields below so we can understand what's going wrong.
+
+ - type: textarea
+ attributes:
+ label: Describe the bug
+ description: A clear and concise description of what the bug is.
+ placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Include some logs
+ description: Any logs you can include will help us investigate the issue.
+ placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Reproducing
+ description: Help us reproduce what you're seeing.
+ placeholder: |
+ Steps to reproduce the behavior:
+ 1. Go to '...'
+ 2. Click on '....'
+ 3. Scroll down to '....'
+ 4. See error
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Expected behavior
+ description: A clear and concise description of what you expected to happen.
+ placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Your environment
+ description: Give us as many details as you can about your environment, whether that's on Platform.sh (your configuration YAMLs), or locally (your OS, services, and local development tool).
+ placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend.
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Screenshots
+ description: If applicable, add screenshots to help explain your problem.
+ placeholder: A picture's worth a thousand words...
+ validations:
+ required: false
+
+ - type: textarea
+ attributes:
+ label: Additional context
+ description: Optionally add any other information or screenshots that could help us understand and implement the change.
+ placeholder: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eleifend diam non condimentum tincidunt. Vestibulum convallis eget ante dapibus eleifend.
+ validations:
+ required: false
+
\ No newline at end of file
diff --git a/templates/drupal11/files/.github/ISSUE_TEMPLATE/config.yaml b/templates/drupal11/files/.github/ISSUE_TEMPLATE/config.yaml
new file mode 100644
index 000000000..6391f6f4d
--- /dev/null
+++ b/templates/drupal11/files/.github/ISSUE_TEMPLATE/config.yaml
@@ -0,0 +1,8 @@
+blank_issues_enabled: false
+contact_links:
+ - name: Community Support
+ url: https://community.platform.sh/
+ about: Please ask and answer questions here.
+ - name: Join us on Slack
+ url: https://chat.platform.sh/
+ about: Ping the `@devrel_team`!
diff --git a/templates/drupal11/files/.github/ISSUE_TEMPLATE/improvements.yaml b/templates/drupal11/files/.github/ISSUE_TEMPLATE/improvements.yaml
new file mode 100644
index 000000000..0ba3aa5cd
--- /dev/null
+++ b/templates/drupal11/files/.github/ISSUE_TEMPLATE/improvements.yaml
@@ -0,0 +1,41 @@
+name: Feature request
+description: For changes to improve this template.
+labels:
+ - 'feature request'
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for your interest in helping improve the Platform.sh templates!
+ Please fill in the fields below so we can understand what changes you'd like to see.
+
+ - type: textarea
+ attributes:
+ label: What in this template can be improved or added as a feature?
+ description: Is your feature request related to a problem? Please describe.
+ placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: What exactly should be updated?
+ description: |
+ - Share as much detail as you can to help us understand the suggestion.
+ - What do you expect as an outcome?
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: How important is this feature to you?
+ description: Does this template lacking this feature block your work?
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: Additional context
+ description: Optionally add any other information or screenshots that could help us understand and implement the change.
+ validations:
+ required: false
diff --git a/templates/drupal11/files/.github/PULL_REQUEST_TEMPLATE.md b/templates/drupal11/files/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000..b41bea1c8
--- /dev/null
+++ b/templates/drupal11/files/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,34 @@
+## Description
+Please describe your changes in detail according to the information below
+
+## Related Issue
+This project only accepts pull requests related to open issues.
+- If suggesting a new feature or change, please discuss it in an issue first
+- If fixing a bug, there should be an issue describing it with steps to reproduce it following the bug report guide
+- If you're suggesting a feature, please follow the feature request guide by clicking on issues
+
+### Please drop a link to the issue here:
+
+## Motivation and Context
+Why is this change required? What problem does it solve?
+
+## How Has This Been Tested?
+Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc.
+
+## Screenshots (if appropriate):
+
+## Types of changes
+What types of changes does your code introduce? Put an `x` in all the boxes that apply:
+
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Breaking change (fix or feature that would cause existing functionality to change)
+
+## Checklist:
+ Go over all the following list, and put an `x` in all the boxes that apply. If you're unsure about what any of these mean, don't hesitate to ask. We're here to help!
+
+- [ ] I have read the contribution guide
+- [ ] I have created an issue following the issue guide
+- [ ] My code follows the code style of this project.
+- [ ] My change requires a change to the documentation.
+- [ ] I have updated the documentation accordingly.
diff --git a/templates/drupal11/files/.github/tests/vrt/template-paths.js b/templates/drupal11/files/.github/tests/vrt/template-paths.js
new file mode 100644
index 000000000..0a86aeca2
--- /dev/null
+++ b/templates/drupal11/files/.github/tests/vrt/template-paths.js
@@ -0,0 +1,54 @@
+/**
+ * This is the default scenarios collection that will be used if there is not a theme-specific scenarios file in place
+ * for a given theme. You can copy this file and then name it `theme-paths.js`.
+ *
+ */
+
+/**
+ * Stores the scenarios for each page/endpoint that should be tested
+ * @type {{}}
+ */
+var scenarioPaths = {};
+
+/**
+ * For each page/endpoint you want to test, create a new array entry that contains at least the keys/properties `label`
+ * and `path`.
+ *
+ * additional properties you can set for each scenario are documented here: https://github.com/garris/BackstopJS#advanced-scenarios
+ *
+ * However, do NOT set `referenceUrl` or `url` as those will be overridden
+ *
+ * `path` should assume the URL ends in a trailing slash. For example, if the page you want to test against is
+ * https://master-7rqtwti-fqfjrmtjbjta4.eu-3.platformsh.site/a/path/to/foo/bar/
+ * Then for `path` it should be "a/path/to/foo/bar/"
+ *
+ * @type {{path: string, label: string}[]}
+ */
+scenarioPaths.paths = [
+ {
+ "label": "Home",
+ "delay": 2000,
+ "removeSelectors": ['#block-umami-footer-promo img']
+ },
+ {
+ "label": "Forced 404",
+ "delay": 2000,
+ },
+ {
+ "label":"Vegan chocolate and nut brownies",
+ "path": "en/recipes/vegan-chocolate-and-nut-brownies/",
+ "delay": 2000,
+ },
+ {
+ "label": "Category: Healthy",
+ "path": "en/tags/healthy/",
+ "delay": 2000,
+ },
+ {
+ "label": "All Articles",
+ "path": "en/articles/",
+ "delay": 2000,
+ }
+];
+
+module.exports = scenarioPaths;
diff --git a/templates/drupal11/files/.github/workflows/autopr.yaml b/templates/drupal11/files/.github/workflows/autopr.yaml
new file mode 100644
index 000000000..7b6d989d0
--- /dev/null
+++ b/templates/drupal11/files/.github/workflows/autopr.yaml
@@ -0,0 +1,23 @@
+########################################################################################################################
+## ##
+## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ##
+## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ##
+## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ##
+## ##
+## YOU CAN SAFELY DELETE THIS FILE ##
+## ##
+########################################################################################################################
+name: Trigger Auto PR on push to update branch
+on:
+ push:
+ branches:
+ - update
+ workflow_dispatch:
+
+env:
+ PLATFORMSH_CLI_TOKEN: ${{ secrets.TEMPLATES_CLI_TOKEN }}
+
+jobs:
+ run-reusable-autopr:
+ uses: platformsh-templates/ghrw-templates/.github/workflows/autopr.yaml@main
+ secrets: inherit
diff --git a/templates/drupal11/files/.github/workflows/post-pr-acceptance.yaml b/templates/drupal11/files/.github/workflows/post-pr-acceptance.yaml
new file mode 100644
index 000000000..088c457bc
--- /dev/null
+++ b/templates/drupal11/files/.github/workflows/post-pr-acceptance.yaml
@@ -0,0 +1,20 @@
+########################################################################################################################
+## ##
+## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ##
+## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ##
+## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ##
+## ##
+## YOU CAN SAFELY DELETE THIS FILE ##
+## ##
+########################################################################################################################
+name: Runs post merge-acceptance workflows
+on:
+ push:
+ branches:
+ - main
+ - master
+
+jobs:
+ run-reusable-post-pr-acceptance:
+ uses: platformsh-templates/ghrw-templates/.github/workflows/post-pr-acceptance.yaml@main
+ secrets: inherit
diff --git a/templates/drupal11/files/.github/workflows/project-issues.yaml b/templates/drupal11/files/.github/workflows/project-issues.yaml
new file mode 100644
index 000000000..c2dcd10bd
--- /dev/null
+++ b/templates/drupal11/files/.github/workflows/project-issues.yaml
@@ -0,0 +1,20 @@
+########################################################################################################################
+## ##
+## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ##
+## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ##
+## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ##
+## ##
+## YOU CAN SAFELY DELETE THIS FILE ##
+## ##
+########################################################################################################################
+name: Sync repository issues to template-builder project
+
+on:
+ issues:
+ types:
+ - opened
+
+jobs:
+ run-reusable-issue-sync:
+ uses: platformsh-templates/ghrw-templates/.github/workflows/project-issues.yaml@main
+ secrets: inherit
diff --git a/templates/drupal11/files/.github/workflows/sourceops.yaml b/templates/drupal11/files/.github/workflows/sourceops.yaml
new file mode 100644
index 000000000..3949f0642
--- /dev/null
+++ b/templates/drupal11/files/.github/workflows/sourceops.yaml
@@ -0,0 +1,20 @@
+########################################################################################################################
+## ##
+## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ##
+## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ##
+## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ##
+## ##
+## YOU CAN SAFELY DELETE THIS FILE ##
+## ##
+########################################################################################################################
+name: Trigger Source Operations on a Schedule
+on:
+ schedule:
+ # Run at 00:15 every day
+ - cron: '15 */19 * * *'
+ workflow_dispatch:
+
+jobs:
+ run-reusable-sop-update:
+ uses: platformsh-templates/ghrw-templates/.github/workflows/sourceops.yaml@main
+ secrets: inherit
diff --git a/templates/drupal11/files/.github/workflows/testprenvironment.yaml b/templates/drupal11/files/.github/workflows/testprenvironment.yaml
new file mode 100644
index 000000000..6a7232669
--- /dev/null
+++ b/templates/drupal11/files/.github/workflows/testprenvironment.yaml
@@ -0,0 +1,32 @@
+########################################################################################################################
+## ##
+## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ##
+## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ##
+## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ##
+## ##
+## YOU CAN SAFELY DELETE THIS FILE ##
+## ##
+########################################################################################################################
+name: "TestPullRequestEnv"
+run-name: "TestPullRequestEnv"
+on:
+ workflow_run:
+ workflows: [ "platformsh" ]
+ types:
+ - completed
+ pull_request:
+ branches:
+ - master
+ - main
+
+jobs:
+ # !!!! WARNING !!!! #
+ # If for some reason you decide to change this jobid from `TestPrEnv-CW` to something else, you will also need to
+ # add a repository variable of CW_JOBID with a value of the new jobid.
+ # Explanation: the jobid below is part of the status check name that is used in preparing the repository for an
+ # auto-accepting PR. If you change the jobid below, but do not add the repo variable with this value, then the repository
+ # will be configured to require a status check that does not exist and it will be unable to accept the PR. In addition,
+ # you will be blocked from accepting the PR until you remove it from the repo's settings
+ TestPrEnv-CW:
+ uses: platformsh-templates/ghrw-templates/.github/workflows/testprenvironment.yaml@main
+ secrets: inherit
diff --git a/templates/drupal11/files/.github/workflows/workflow-fail-log.yaml b/templates/drupal11/files/.github/workflows/workflow-fail-log.yaml
new file mode 100644
index 000000000..0c295f59b
--- /dev/null
+++ b/templates/drupal11/files/.github/workflows/workflow-fail-log.yaml
@@ -0,0 +1,42 @@
+########################################################################################################################
+## ##
+## This github workflow file is part of the Platform.sh process of updating and maintaining our collection of ##
+## templates. For more information see https://github.com/platformsh-templates/ghrw-templates ##
+## and https://github.com/search?q=topic%3Agithub-action+org%3Aplatformsh ##
+## ##
+## YOU CAN SAFELY DELETE THIS FILE ##
+## ##
+########################################################################################################################
+on:
+ workflow_run:
+ workflows: [Trigger Source Operations on a Schedule, Trigger Auto PR on push to update branch, Run Post PR Acceptance jobs]
+ types: [completed]
+
+jobs:
+ on-failure:
+ runs-on: ubuntu-latest
+ if: |
+ github.event.workflow_run.conclusion == 'failure'
+ && github.event.workflow.name != 'TestPrEnv-CW / TestPrEnvironment'
+ && github.repository_owner == 'platformsh-templates'
+ && github.event.commits[0].author.name != 'GitHub Action'
+ steps:
+ - name: Record failed workflow
+ shell: bash
+ run: |
+ echo 'The triggering workflow failed'
+ echo "::notice::The workflow ${{ github.event.workflow.name }} failed."
+ - name: 'Add env vars'
+ shell: bash
+ run: |
+ echo "GH_TOKEN=${{ secrets.TEMPLATES_GITHUB_TOKEN }}" >> $GITHUB_ENV
+ - name: 'Check and record API limits'
+ shell: bash
+ run: |
+ userName=$(gh api user | jq -r '.login')
+ currentRateLimit=$(gh api /users/platformsh/orgs -i | grep X-Ratelimit)
+ echo "::notice::The API user ${userName} has the following X-Ratelimit values:"
+ echo "::group::X-RateLimits for ${userName}"
+ echo "${currentRateLimit}"
+ echo "::endgroup::"
+
diff --git a/templates/drupal11/files/.gitignore b/templates/drupal11/files/.gitignore
new file mode 100644
index 000000000..da0f0dc16
--- /dev/null
+++ b/templates/drupal11/files/.gitignore
@@ -0,0 +1,34 @@
+# Ignore directories generated by Composer
+/drush/contrib/
+/vendor/
+/web/core/
+/web/modules/contrib/
+/web/themes/contrib/
+/web/profiles/contrib/
+/web/libraries/
+console/
+
+# Ignore sensitive information
+/web/sites/*/settings.local.php
+
+# Ignore Drupal's file directory
+/web/sites/*/files/
+
+# Ignore SimpleTest multi-site environment.
+/web/sites/simpletest
+
+# Ignore files generated by PhpStorm
+/.idea/
+
+# Ignore .env files as they are personal
+/.env
+
+# Ignore mounts
+web/sites/default/files
+tmp
+private
+.drush
+drush-backups
+.console
+/.editorconfig
+/.gitattributes
\ No newline at end of file
diff --git a/templates/drupal11/files/.platform.app.yaml b/templates/drupal11/files/.platform.app.yaml
new file mode 100644
index 000000000..f1062c21b
--- /dev/null
+++ b/templates/drupal11/files/.platform.app.yaml
@@ -0,0 +1,203 @@
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
+
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
+name: 'drupal'
+
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: "php:8.3"
+
+# How many resources to devote to the app. Defaults to AUTO in production environments.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#sizes
+# size:
+
+# The relationships of the application with services or other applications.
+# The left-hand side is the name of the relationship as it will be exposed
+# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
+# side is in the form `:`.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#relationships
+relationships:
+ database: 'db:mysql'
+ redis: 'cache:redis'
+
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 2048
+
+# The 'mounts' describe writable, persistent filesystem mounts in the application.
+mounts:
+ # The default Drupal files directory.
+ '/web/sites/default/files':
+ source: local
+ source_path: 'files'
+ # Drupal gets its own dedicated tmp directory. The settings.platformsh.php
+ # file will automatically configure Drupal to use this directory.
+ '/tmp':
+ source: local
+ source_path: 'tmp'
+ # Private file uploads are stored outside the web root. The settings.platformsh.php
+ # file will automatically configure Drupal to use this directory.
+ '/private':
+ source: local
+ source_path: 'private'
+ # Drush needs a scratch space for its own caches.
+ '/.drush':
+ source: local
+ source_path: 'drush'
+ # Drush will try to save backups to this directory, so it must be
+ # writeable even though you will almost never need to use it.
+ '/drush-backups':
+ source: local
+ source_path: 'drush-backups'
+
+# Configuration of the build of this application.
+build:
+ flavor: composer
+
+# The web key configures the web server running in front of your app.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#web
+web:
+ # Commands are run once after deployment to start the application process.
+ # More information: https://docs.platform.sh/create-apps/app-reference.html#web-commands
+ # commands:
+ # The command to launch your app. If it terminates, it’s restarted immediately.
+ # You can use the $PORT or the $SOCKET environment variable depending on the socket family of your upstream
+ # PHP applications run PHP-fpm by default
+ # Read about alternative commands here: https://docs.platform.sh/languages/php.html#alternate-start-commands
+ # start: echo 'Put your start command here'
+ # You can listen to a UNIX socket (unix) or a TCP port (tcp, default).
+ # For PHP, the defaults are configured for PHP-FPM and shouldn't need adjustment.
+ # Whether your app should speak to the webserver via TCP or Unix socket. Defaults to tcp
+ # More information: https://docs.platform.sh/create-apps/app-reference.html#where-to-listen
+ # upstream:
+ # socket_family: unix
+ # Each key in locations is a path on your site with a leading /.
+ # More information: https://docs.platform.sh/create-apps/app-reference.html#locations
+ locations:
+ # All requests not otherwise specified follow these rules.
+ '/':
+ # The folder from which to serve static assets, for this location.
+ #
+ # This is a filesystem path, relative to the application root.
+ root: 'web'
+
+ # How long to allow static assets from this location to be cached.
+ #
+ # Can be a time in seconds, or -1 for no caching. Times can be
+ # suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d"
+ # (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as
+ # 365 days).
+ expires: 5m
+
+ # Redirect any incoming request to Drupal's front controller.
+ passthru: '/index.php'
+
+ # Deny access to all static files, except those specifically allowed below.
+ allow: false
+
+ # Rules for specific URI patterns.
+ rules:
+ # Allow access to common static files.
+ '\.(avif|webp|jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf)$':
+ allow: true
+ '^/robots\.txt$':
+ allow: true
+ '^/sitemap\.xml$':
+ allow: true
+
+ # Deny direct access to configuration files.
+ '^/sites/sites\.php$':
+ scripts: false
+ '^/sites/[^/]+/settings.*?\.php$':
+ scripts: false
+
+ # The files directory has its own special configuration rules.
+ '/sites/default/files':
+ # Allow access to all files in the public files directory.
+ allow: true
+ expires: 5m
+ passthru: '/index.php'
+ root: 'web/sites/default/files'
+
+ # Do not execute PHP scripts from the writeable mount.
+ scripts: false
+
+ rules:
+ # Provide a longer TTL (2 weeks) for aggregated CSS and JS files.
+ '^/sites/default/files/(css|js)':
+ expires: 2w
+
+# Alternate copies of the application to run as background processes.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#workers
+# workers:
+
+# The timezone for crons to run. Format: a TZ database name. Defaults to UTC, which is the timezone used for all logs
+# no matter the value here. More information: https://docs.platform.sh/create-apps/timezone.html
+# timezone:
+
+# Access control for roles accessing app environments.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#access
+# access:
+
+# Variables to control the environment. More information: https://docs.platform.sh/create-apps/app-reference.html#variables
+#variables:
+
+# Outbound firewall rules for the application. More information: https://docs.platform.sh/create-apps/app-reference.html#firewall
+# firewall:
+
+# Specifies a default set of build tasks to run. Flavors are language-specific.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#build
+
+# Installs global dependencies as part of the build process. They’re independent of your app’s dependencies and
+# are available in the PATH during the build process and in the runtime environment. They’re installed before
+# the build hook runs using a package manager for the language.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#dependencies
+dependencies:
+ php:
+ composer/composer: "^2.7"
+
+# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
+# More information: https://docs.platform.sh/create-apps/app-reference.html#hooks
+hooks:
+ # The build hook runs after Composer to finish preparing up your code.
+ # No services are available but the disk is writeable.
+ build: |
+ set -e
+ # The deploy hook runs after your application has been deployed and started.
+ # Code cannot be modified at this point but the database is available.
+ # The site is not accepting requests while this script runs so keep it
+ # fast.
+ deploy: |
+ set -e
+ php ./drush/platformsh_generate_drush_yml.php
+ # if drupal is installed, will call the following drush commands:
+ # - `cache-rebuild`
+ # - `updatedb`
+ # - and if config files are present, `config-import`
+ cd web
+ bash $PLATFORM_APP_DIR/drush/platformsh_deploy_drupal.sh
+
+ # The post_deploy hook is run after the app container has been started and after it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ # post_deploy: |
+
+# Scheduled tasks for the app.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#crons
+crons:
+ # Run Drupal's cron tasks every 19 minutes.
+ drupal:
+ spec: '*/19 * * * *'
+ commands:
+ start: 'cd web ; drush core-cron'
+
+# Customizations to your PHP or Lisp runtime. More information: https://docs.platform.sh/create-apps/app-reference.html#runtime
+runtime:
+ # Enable the redis extension so Drupal can communicate with the Redis cache.
+ extensions:
+ - redis
+ - sodium
+ - apcu
+ - blackfire
+
+# More information: https://docs.platform.sh/create-apps/app-reference.html#additional-hosts
+# additional_hosts:
diff --git a/templates/drupal11/files/.platform/local/.gitignore b/templates/drupal11/files/.platform/local/.gitignore
new file mode 100644
index 000000000..b498fd495
--- /dev/null
+++ b/templates/drupal11/files/.platform/local/.gitignore
@@ -0,0 +1 @@
+/
diff --git a/templates/drupal11/files/.platform/local/README.txt b/templates/drupal11/files/.platform/local/README.txt
new file mode 100644
index 000000000..f360b8495
--- /dev/null
+++ b/templates/drupal11/files/.platform/local/README.txt
@@ -0,0 +1,8 @@
+.platform/local
+===============
+
+This directory is where the Platform.sh CLI stores configuration files, builds, and
+other data to help work with your project locally.
+
+It is not used on remote environments at all - the directory is excluded from
+your Git repository (via .git/info/exclude).
diff --git a/templates/drupal11/files/.platform/local/project.yaml b/templates/drupal11/files/.platform/local/project.yaml
new file mode 100644
index 000000000..4a9c56a3b
--- /dev/null
+++ b/templates/drupal11/files/.platform/local/project.yaml
@@ -0,0 +1,2 @@
+id: eo4nje6foksua
+host: api.platform.sh
diff --git a/templates/drupal11/files/.platform/routes.yaml b/templates/drupal11/files/.platform/routes.yaml
new file mode 100644
index 000000000..69ba2fcd0
--- /dev/null
+++ b/templates/drupal11/files/.platform/routes.yaml
@@ -0,0 +1,17 @@
+# The routes of the project.
+#
+# Each route describes how an incoming URL is going
+# to be processed by Platform.sh.
+
+"https://{default}/":
+ type: upstream
+ upstream: "drupal:http"
+ cache:
+ enabled: true
+
+ # Base the cache on the session cookie and custom Drupal cookies. Ignore all other cookies.
+ cookies: ['/^SS?ESS/', '/^Drupal.visitor/']
+
+"https://www.{default}/":
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/drupal11/files/.platform/services.yaml b/templates/drupal11/files/.platform/services.yaml
new file mode 100644
index 000000000..6ce51a774
--- /dev/null
+++ b/templates/drupal11/files/.platform/services.yaml
@@ -0,0 +1,11 @@
+# The services of the project.
+#
+# Each service listed will be deployed
+# to power your Platform.sh project.
+
+db:
+ type: mariadb:10.6
+ disk: 2048
+
+cache:
+ type: redis:7.2
diff --git a/templates/drupal11/files/README.md b/templates/drupal11/files/README.md
new file mode 100644
index 000000000..fae0b2a96
--- /dev/null
+++ b/templates/drupal11/files/README.md
@@ -0,0 +1,832 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+Deploy Drupal 11 on Platform.sh
+
+
+Contribute, request a feature, or check out our resources
+
+
+Join our community      
+Documentation      
+Blog      
+Report a bug      
+Request a feature
+
+
+
+
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+Contents
+
+About      
+Getting started      
+Migrate      
+Learn      
+Contribute      
+
+
+
+
+## About
+
+This template builds Drupal 10 using the "Drupal Recommended" Composer project. It is pre-configured to use MariaDB and Redis for caching. The Drupal installer will skip asking for database credentials as they are already provided.
+
+Drupal is a flexible and extensible PHP-based CMS framework.
+
+### Features
+
+- PHP 8.3
+- MariaDB 10.6
+- Redis 7.2
+- Drush included
+- Automatic TLS certificates
+- Composer-based build
+
+
+## Getting started
+
+### Deploy
+
+#### Quickstart
+
+
+The quickest way to deploy this template on Platform.sh is by clicking the button below.
+This will automatically create a new project and initialize the repository for you.
+
+
+
+
+
+
+
+
+
+
+You can also quickly recreate this project locally with the following command:
+
+```bash
+composer create-project platformsh/drupal11 -s dev
+```
+
+
+> **Note:**
+>
+> Platform.sh templates prioritize upstream release versions over our own. Despite this, we update template dependencies on a scheduled basis independent of those upstreams. Because of this, template repos do not contain releases. This may change in the future, but until then the `-s dev` flag is necessary to use `composer create-project`.
+
+
+
+#### Other deployment options
+
+For all of the other options below, clone this repository first:
+
+```bash
+git clone https://github.com/platformsh-templates/drupal11
+```
+
+If you're trying to deploy from GitHub, you can generate a copy of this repository first in your own namespace by clicking the [Use this template](https://github.com/platformsh-templates/drupal11/generate) button at the top of this page.
+
+Then you can clone a copy of it locally with `git clone git@github.com:YOUR_NAMESPACE/drupal11.git`.
+
+
+
+Deploy directly to Platform.sh from the command line
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to this repository's settings, or to what you have updated the default branch to locally.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Set the project remote
+
+ Find your `PROJECT_ID` by running the command `platform project:list`
+
+ ```bash
+ +---------------+------------------------------------+------------------+---------------------------------+
+ | ID | Title | Region | Organization |
+ +---------------+------------------------------------+------------------+---------------------------------+
+ | PROJECT_ID | Your Project Name | xx-5.platform.sh | your-username |
+ +---------------+------------------------------------+------------------+---------------------------------+
+ ```
+
+ Then from within your local copy, run the command `platform project:set-remote PROJECT_ID`.
+
+1. Push
+
+ ```bash
+ git push platform DEFAULT_BRANCH
+ ```
+
+
+
+
+
+Integrate with a GitHub repo and deploy pull requests
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to whatever you have set at `https://YOUR_NAMESPACE/nextjs-drupal`.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Setup the integration:
+
+ Consult the [GitHub integration documentation](https://docs.platform.sh/integrations/source/github.html#setup) to finish connecting your repository to a project on Platform.sh. You will need to create an Access token on GitHub to do so.
+
+
+
+
+
+Integrate with a GitLab repo and deploy merge requests
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to this repository's settings, or to what you have updated the default branch to locally.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Create the repository
+
+ Create a new repository on GitLab, set it as a new remote for your local copy, and push to the default branch.
+
+1. Setup the integration:
+
+ Consult the [GitLab integration documentation](https://docs.platform.sh/integrations/source/gitlab.html#setup) to finish connecting a repository to a project on Platform.sh. You will need to create an Access token on GitLab to do so.
+
+
+
+
+
+Integrate with a Bitbucket repo and deploy pull requests
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to this repository's settings, or to what you have updated the default branch to locally.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Create the repository
+
+ Create a new repository on Bitbucket, set it as a new remote for your local copy, and push to the default branch.
+
+1. Setup the integration:
+
+ Consult the [Bitbucket integration documentation](https://docs.platform.sh/integrations/source/bitbucket.html#setup) to finish connecting a repository to a project on Platform.sh. You will need to create an Access token on Bitbucket to do so.
+
+
+
+
+
+
+### Post-install
+
+Run through the Drupal installer as normal. You will not be asked for database credentials as those are already provided.
+
+### Local development
+
+This section provides instructions for running the `drupal11` template locally, connected to a live database instance on an active Platform.sh environment.
+
+In all cases for developing with Platform.sh, it's important to develop on an isolated environment - do not connect to data on your production environment when developing locally.
+Each of the options below assume that you have already deployed this template to Platform.sh, as well as the following starting commands:
+
+```bash
+$ platform get PROJECT_ID
+$ cd project-name
+$ platform environment:branch updates
+```
+
+
+Drupal: using ddev
+
+ddev provides an integration with Platform.sh that makes it simple to develop Drupal locally. Check the [providers documentation](https://ddev.readthedocs.io/en/latest/users/providers/platform/) for the most up-to-date information.
+
+In general, the steps are as follows:
+
+1. [Install ddev](https://ddev.readthedocs.io/en/stable/#installation).
+1. Run `ddev config`.
+1. [Retrieve an API token](https://docs.platform.sh/development/cli/api-tokens.html#get-a-token) for your organization via the management console.
+1. Update your dedev global configuration file to use the token you've just retrieved:
+ ```yaml
+ web_environment:
+ - PLATFORMSH_CLI_TOKEN=abcdeyourtoken`
+ ```
+1. Run `ddev restart`.
+1. Get your project ID with `platform project:info`. If you have not already connected your local repo with the project (as is the case with a source integration, by default), you can run `platform project:list` to locate the project ID, and `platform project:set-remote PROJECT_ID` to configure Platform.sh locally.
+1. Update the `.ddev/providers/platform.yaml` file for your current setup:
+ ```yaml
+ environment_variables:
+ project_id: PROJECT_ID
+ environment: CURRENT_ENVIRONMENT
+ application: drupal
+ ```
+1. Get the current environment's data with `ddev pull platform`.
+1. When you have finished with your work, run `ddev stop` and `ddev poweroff`.
+
+
+
+Drupal: using Lando
+
+Lando supports PHP applications [configured to run on Platform.sh](https://docs.platform.sh/development/local/lando.html), and pulls from the same container registry Platform.sh uses on your remote environments during your local builds through its own [recipe and plugin](https://docs.lando.dev/platformsh/).
+
+1. [Install Lando](https://docs.lando.dev/getting-started/installation.html).
+1. Make sure Docker is already running - Lando will attempt to start Docker for you, but it's best to have it running in the background before beginning.
+1. Start your apps and services with the command `lando start`.
+1. To get up-to-date data from your Platform.sh environment ([services *and* mounts](https://docs.lando.dev/platformsh/sync.html#pulling)), run the command `lando pull`.
+1. If at any time you have updated your Platform.sh configuration files, run the command `lando rebuild`.
+1. When you have finished with your work, run `lando stop` and `lando poweroff`.
+
+
+
+
+
+> **Note:**
+>
+> For many of the steps above, you may need to include the CLI flags `-p PROJECT_ID` and `-e ENVIRONMENT_ID` if you are not in the project directory or if the environment is associated with an existing pull request.
+
+
+## Migrate
+
+The steps below outline the important steps for migrating your application to Platform.sh - adding the required configuration files and dependencies, for example.
+Not every step will be applicable to each person's migration.
+These steps actually assume the earliest starting point possible - that there is no code at all locally, and that this template repository will be rebuilt completely from scratch.
+
+- [Getting started](#getting-started-1)
+- [Adding and updating files](#adding-and-updating-files)
+- [Dependencies](#dependencies)
+- [Deploying to Platform.sh](#deploying-to-platformsh)
+- [Migrating your data](#migrating-your-data)
+- [Next steps](#next-steps)
+
+If you already have code you'd like to migrate, feel free to focus on the steps most relevant to your application and skip the first section.
+
+### Getting started
+
+Assuming that your starting point is no local code, the steps below will setup a starting repository we can begin to make changes to to rebuild this template and migrate to Platform.sh.
+If you already have a codebase you are trying to migrate, move onto the next step - [Adding and updating files](#adding-and-updating-files) - and substitute any reference to the default branch `main` with some other branch name.
+
+
+
+```bash
+$ mkdir drupal11 && cd drupal11
+$ git init
+$ git remote add upstream https://github.com/drupal/recommended-project.git
+$ git branch -m main
+$ git fetch --all --depth=2
+$ git fetch --all --tags
+$ git merge --allow-unrelated-histories -X theirs 10.0.0-rc1
+
+```
+
+
+
+### Adding and updating files
+
+A small number of files need to be added to or modified in your repository at this point.
+Some of them explicitly configure how the application is built and deployed on Platform.sh, while others simply modify files you may already have locally, in which case you will need to replicate those changes.
+
+Open the dropdown below to view all of the **Added** and **Updated** files you'll need to reproduce in your migration.
+
+
+View files
+
+
+
+| File | Purpose |
+|:-----------|:--------|
+| [`config/sync/.gitkeep`](config/sync/.gitkeep) | **Added** |
+| [`web/sites/default/settings.php`](web/sites/default/settings.php) | **Updated:**
The Drupal settings file has been updated to import and use `web/sites/default/settings.platformsh.php`. |
+| [`web/sites/default/settings.platformsh.php`](web/sites/default/settings.platformsh.php) | **Added:**
Contains Platform.sh-specific configuration, namely setting up the database connection to the MariaDB service and caching via Redis. |
+| [`.environment`](.environment) | **Added:**
The `.environment` file is a convenient place to [set environment variables](https://docs.platform.sh/development/variables/set-variables.html#set-variables-via-script) relevant to your applications that may be dependent on the current environment. It is sourced before the start command is run, as the first step in the `deploy` and `post_deploy` hooks, and at the beginning of each session when you SSH into an application container. It is written in dash, so be aware of the differences to bash.
It can be used to set any environment variable, including ones that depend on Platform.sh-provided variables like `PLATFORM_RELATIONSHIPS` and `PLATFORM_ROUTES`, or to modify `PATH`. This file should not [produce output](https://docs.platform.sh/development/variables/set-variables.html#testing-environment-scripts).
Here, the Composer config and `PATH` are updated to allow executable app dependencies from Composer to be run from the path (i.e. `drush`). |
+| [`.gitignore`](.gitignore) | **Added:**
A `.gitignore` file is not included in the upstream, so one has been added. |
+| [`.platform.app.yaml`](.platform.app.yaml) | **Added:**
This file is required to define the build and deploy process for all application containers on Platform.sh. Within this file, the runtime version, relationships to service containers, and writable mounts are configured. It's also in this file that it is defined what dependencies are installed, when they are installed, and that package manager will be used to do so.
Take a look at the [Application](https://docs.platform.sh/configuration/app.html) documentation for more details about configuration. For more information about the sequence of events that lead from a build to deployment, see the [Build and deploy timeline documentation](https://docs.platform.sh/overview/build-deploy.html).
This template uses Composer 2 to install dependencies using the default `composer` [build flavor](https://docs.platform.sh/languages/php.html#build-flavor) prior to the `build` hook. Drush tasks are run during the `deploy` hook, and referenced again during the defined `cron` job. |
+| [`drush/platformsh_generate_drush_yml.php`](drush/platformsh_generate_drush_yml.php) | **Added:**
This file has been included to generate the drush yaml configuration on every deployment. |
+| [`.platform/services.yaml`](.platform/services.yaml) | **Added:**
Platform.sh provides a number of on-demand managed services that can easily be added to your projects. It's within this file that each service's version, name, resources, and additional configuration are set. See the [Services documentation](https://docs.platform.sh/configuration/services.html) for more details on configuration, version and service availability.
In this template, MariaDB and Redis have been configured. |
+| [`.platform/routes.yaml`](.platform/routes.yaml) | **Added:**
This file is require to deploy on Platform.sh, as it defines how requests should be handled on the platform. It's within this file that redirects and basic caching can be configured. See the [Routes documentation](https://docs.platform.sh/configuration/routes.html) for more configuration details.
|
+| [`php.ini`](php.ini) | **Added:**
An initial `php.ini` file has also beed added. The settings are a result of performance testing and best practice recommendations coming from [Blackfire.io](https://blackfire.io). They will initialize Drupal with a number of good baseline performance settings for production applications, and complement many of the tests specified in [`.blackfire.yml`](.blackfire.yml). |
+| [`.blackfire.yml`](.blackfire.yml) | **Added:**
This file has been added to help you get started using [Blackfire.io](https://blackfire.io) on your project. See [the Blackfire section below](#blackfireio-creating-a-continuous-observability-strategy) for more information on how to get started. |
+| [`.lando.upstream.yml`](.lando.upstream.yml) | **Added:**
This file configures [Lando](https://docs.platform.sh/development/local/lando.html) as a local development option for this template. See the [Platform.sh Lando plugin documentation](https://docs.lando.dev/platformsh/) for more information about configuration and the [Local development](#local-development) section of this README for how to get started. |
+| [`.ddev/providers/platform.yaml`](.ddev/providers/platform.yaml) | **Added:**
This file configures [ddev](https://ddev.readthedocs.io/en/latest/users/providers/platform/) as a local development option for this template. See the [Platform.sh ddev integration documentation](https://ddev.readthedocs.io/en/latest/users/providers/platform/) for more information about configuration and the [Local development](#local-development) section of this README for how to get started. Be sure to follow the instructions provided through the ddev CLI and in the comments section of that file to correctly configure ddev for your project. |
+
+
+
+
+
+### Dependencies and configuration
+
+Sometimes it is necessary to install additional dependencies to and modify the configuration of an upstream project to deploy on Platform.sh.
+When it is, we do our best to keep these modifications to the minimum necessary.
+Run the commands below to reproduce the dependencies in this template.
+
+
+
+```bash
+$ composer require platformsh/config-reader drush/drush drupal/redis
+$ composer config allow-plugins.composer/installers true --no-plugins
+$ composer config allow-plugins.drupal/core-composer-scaffold true --no-plugins
+$ composer config allow-plugins.drupal/core-project-message true --no-plugins
+$ composer config allow-plugins.cweagans/composer-patches true --no-plugins
+
+```
+
+
+
+### Deploying to Platform.sh
+
+Your repository now has all of the code it needs in order to deploy to Platform.sh.
+
+
+
+Deploy directly to Platform.sh from the command line
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to this repository's settings, or to what you have updated the default branch to locally.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Set the project remote
+
+ Find your `PROJECT_ID` by running the command `platform project:list`
+
+ ```bash
+ +---------------+------------------------------------+------------------+---------------------------------+
+ | ID | Title | Region | Organization |
+ +---------------+------------------------------------+------------------+---------------------------------+
+ | PROJECT_ID | Your Project Name | xx-5.platform.sh | your-username |
+ +---------------+------------------------------------+------------------+---------------------------------+
+ ```
+
+ Then from within your local copy, run the command `platform project:set-remote PROJECT_ID`.
+
+1. Push
+
+ ```bash
+ git push platform DEFAULT_BRANCH
+ ```
+
+
+
+
+
+Integrate with a GitHub repo and deploy pull requests
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to whatever you have set at `https://YOUR_NAMESPACE/nextjs-drupal`.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Setup the integration:
+
+ Consult the [GitHub integration documentation](https://docs.platform.sh/integrations/source/github.html#setup) to finish connecting your repository to a project on Platform.sh. You will need to create an Access token on GitHub to do so.
+
+
+
+
+
+Integrate with a GitLab repo and deploy merge requests
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to this repository's settings, or to what you have updated the default branch to locally.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Create the repository
+
+ Create a new repository on GitLab, set it as a new remote for your local copy, and push to the default branch.
+
+1. Setup the integration:
+
+ Consult the [GitLab integration documentation](https://docs.platform.sh/integrations/source/gitlab.html#setup) to finish connecting a repository to a project on Platform.sh. You will need to create an Access token on GitLab to do so.
+
+
+
+
+
+Integrate with a Bitbucket repo and deploy pull requests
+
+
+1. Create a free trial:
+
+ [Register for a 30 day free trial with Platform.sh](https://auth.api.platform.sh/register). When you have completed signup, select the **Create from scratch** project option. Give you project a name, and select a region where you would like it to be deployed. As for the *Production environment* option, make sure to match it to this repository's settings, or to what you have updated the default branch to locally.
+
+1. Install the Platform.sh CLI
+
+ #### Linux/OSX
+
+ ```bash
+ curl -sS https://platform.sh/cli/installer | php
+ ```
+
+ #### Windows
+
+ ```bash
+ curl -f https://platform.sh/cli/installer -o cli-installer.php
+ php cli-installer.php
+ ```
+
+ You can verify the installation by logging in (`platformsh login`) and listing your projects (`platform project:list`).
+
+1. Create the repository
+
+ Create a new repository on Bitbucket, set it as a new remote for your local copy, and push to the default branch.
+
+1. Setup the integration:
+
+ Consult the [Bitbucket integration documentation](https://docs.platform.sh/integrations/source/bitbucket.html#setup) to finish connecting a repository to a project on Platform.sh. You will need to create an Access token on Bitbucket to do so.
+
+
+
+
+
+
+### Migrating your data
+
+
+If you are moving an existing site to Platform.sh, then in addition to code you also need to migrate your data. That means your database and your files.
+
+
+Importing the database
+
+First, obtain a database dump from your current site and save your dump file as `database.sql`. Then, import the database into your Platform.sh site using the CLI:
+
+```bash
+platform sql -e main < database.sql
+```
+
+
+
+Importing files
+
+You first need to download your files from your current hosting environment.
+The easiest way is likely with rsync, but consult your old host's documentation.
+
+The `platform mount:upload` command provides a straightforward way to upload an entire directory to your site at once to a `mount` defined in a `.platform.app.yaml` file.
+Under the hood, it uses an SSH tunnel and rsync, so it is as efficient as possible.
+(There is also a `platform mount:download` command you can use to download files later.)
+Run the following from your local Git repository root (modifying the `--source` path if needed and setting `BRANCH_NAME` to the branch you are using).
+
+A few examples are listed below, but repeat for all directories that contain data you would like to migrate.
+
+```bash
+$ platform mount:upload -e main --mount web/sites/default/files --source ./web/sites/default/files
+$ platform mount:upload -e main --mount private --source ./private
+```
+
+Note that `rsync` is picky about its trailing slashes, so be sure to include those.
+
+
+
+
+
+### Next steps
+
+With your application now deployed on Platform.sh, things get more interesting.
+Run the command `platform environment:branch new-feature` for your project, or open a trivial pull request off of your current branch.
+
+The resulting environment is an *exact* copy of production.
+It contains identical infrastructure to what's been defined in your configuration files, and even includes data copied from your production environment in its services.
+On this isolated environment, you're free to make any changes to your application you need to, and really test how they will behave on production.
+
+After that, here are a collection of additional resources you might find interesting as you continue with your migration to Platform.sh:
+
+- [Local development](#local-development)
+- [Troubleshooting](#troubleshooting)
+- [Adding a domain and going live](https://docs.platform.sh/domains/steps.html)
+- [(CDN) Content Delivery Networks](https://docs.platform.sh/domains/cdn.html)
+- [Performance and observability with Blackfire.io](https://docs.platform.sh/integrations/observability/blackfire.html)
+- [Pricing](https://docs.platform.sh/overview/pricing.html)
+- [Security and compliance](https://docs.platform.sh/security.html)
+
+
+## Learn
+
+### Troubleshooting
+
+
+
+Accessing logs
+
+After the environment has finished its deployment, you can investigate issues that occured on startup, `deploy` and `post_deploy` hooks, and generally at runtime using the CLI. Run the command:
+
+```bash
+platform ssh
+```
+
+If you are running the command outside of a local copy of the project, you will need to include the `-p` (project) and/or `-e` (environment) flags as well.
+Once you have connected to the container, [logs](https://docs.platform.sh/development/logs.html#container-logs) are available within `/var/log/` for you to investigate.
+
+
+
+
+
+Rebuilding cache
+
+You may run into a database error after installing Drupal on your production environment initially.
+To fix, SSH into the application container (`platform ssh`) and rebuild the cache using Drush:
+
+```bash
+drush cache-rebuild
+```
+
+
+
+
+
+Default hash_salt
behavior
+
+Drupal's [default settings set](https://github.com/drupal/drupal/blob/10.3.x/core/assets/scaffold/files/default.settings.php#L252) `hash_salt` to an empty string:
+
+```php
+$settings['hash_salt'] = '';
+```
+
+In the past, Platform.sh templates have overridden this value:
+
+```php
+$settings['hash_salt'] = $settings['hash_salt'] ?? $platformsh->projectEntropy;
+```
+
+This setting was insufficient to cover some user configurations - such as those cases when an application depends on a `Null` value for `hash_salt`.
+
+Now, the setting looks like this in `settings.platformsh.php`:
+
+```bash
+$settings['hash_salt'] = empty($settings['hash_salt']) ? $platformsh->projectEntropy : $settings['hash_salt'];
+```
+
+This change sets `hash_salt` to the built-in environment variable `PLATFORM_PROJECT_ENTROPY` value if the project contains the default settings OR `Null`.
+If your application code *depends* on an empty value, feel free to comment out that line, or reset again later in that file.
+
+Feel free to visit [`platformsh-templates/drupal9#73`](https://github.com/platformsh-templates/drupal9/pull/73) for more details on this discussion.
+
+
+
+
+
+
+### Blackfire.io: creating a Continuous Observability Strategy
+
+This template includes a starting [`.blackfire.yml`](.blackfire.yml) file that can be used to enable [Application Performance Monitoring](https://blackfire.io/docs/monitoring-cookbooks/index), [Profiling](https://blackfire.io/docs/profiling-cookbooks/index), [Builds](https://blackfire.io/docs/builds-cookbooks/index) and [Performance Testing](https://blackfire.io/docs/testing-cookbooks/index) on your project. Platform.sh comes with Blackfire pre-installed on application containers, and [setting up requires minimal configuration](https://docs.platform.sh/integrations/observability/blackfire.html).
+
+* [What is Blackfire?](https://blackfire.io/docs/introduction)
+* [Configuring Blackfire.io on a Platform.sh project](https://docs.platform.sh/integrations/observability/blackfire.html)
+* [Blackfire.io Platform.sh documentation](https://blackfire.io/docs/integrations/paas/platformsh)
+* [Profiling Cookbooks](https://blackfire.io/docs/profiling-cookbooks/index)
+* [Monitoring Cookbooks](https://blackfire.io/docs/monitoring-cookbooks/index)
+* [Testing Cookbooks](https://blackfire.io/docs/testing-cookbooks/index)
+* [Using Builds](https://blackfire.io/docs/builds-cookbooks/index)
+* [Configuring Integrations](https://blackfire.io/docs/integrations/index)
+
+
+### Resources
+
+
+- [Drupal](https://www.drupal.org/)
+- [Drupal 9 on Platform.sh](https://docs.platform.sh/guides/drupal9/deploy.html)
+- [Platform.sh PHP documentation](https://docs.platform.sh/languages/php.html)
+
+
+
+### Contact
+
+This template is maintained by the Platform.sh Developer Relations team, and they will be notified of all issues and pull requests you open here.
+
+- **Community:** Share your question with the community, or see if it's already been asked on our [Community site](https://community.platform.sh).
+- **Slack:** If you haven't done so already, you can join Platform.sh's [public Slack](https://chat.platform.sh/) channels and ping the `@devrel_team` with any questions.
+
+
+### About Platform.sh
+
+This template has been specifically designed to deploy on Platform.sh.
+
+
+What is Platform.sh?
+
+Platform.sh is a unified, secure, enterprise-grade platform for building, running and scaling web applications. We’re the leader in Fleet Ops: Everything you need to manage your fleet of websites and apps is available from the start. Because infrastructure and workflows are handled from the start, apps just work, so teams can focus on what really matters: making faster changes, collaborating confidently, and scaling responsibly. Whether managing a fleet of ten or ten thousand sites and apps, Platform.sh is the Developer- preferred solution that scales right.
+
+Our key features include:
+
+* **GitOps: Git as the source of truth**
+
+ Every branch becomes a development environment, and nothing can change without a commit.
+
+* **Batteries included: Managed infrastructure**
+
+ [Simple abstraction in YAML](https://docs.platform.sh/configuration/yaml.html) for [committing and configuring infrastructure](https://docs.platform.sh/overview/structure.html), fully managed patch updates, and 24 [runtimes](https://docs.platform.sh/languages.html) & [services](https://docs.platform.sh/configuration/services.html) that can be added with a single line of code.
+
+* **Instant cloning: Branch, merge, repeat**
+
+ [Reusable builds](https://docs.platform.sh/overview/build-deploy.html) and automatically inherited production data provide true staging environments - experiment in isolation, test, then destroy or merge.
+
+* **FleetOps: Fleet management platform**
+
+ Leverage our public API along with custom tools like [Source Operations](https://docs.platform.sh/configuration/app/source-operations.html) and [Activity Scripts](https://docs.platform.sh/integrations/activity.html) to [manage thousands of applications](https://youtu.be/MILHG9OqhmE) - their dependency updates, fresh content, and upstream code.
+
+
+To find out more, check out the demo below and go to our [website](https://platform.sh/product/).
+
+
+
+
+
+
+
+
+
+
+
+## Contribute
+
+Help us keep top-notch templates!
+
+Every one of our templates is open source, and they're important resources for users trying to deploy to Platform.sh for the first time or better understand the platform. They act as getting started guides, but also contain a number of helpful tips and best practices when working with certain languages and frameworks.
+
+See something that's wrong with this template that needs to be fixed? Something in the documentation unclear or missing? Let us know!
+
+
+How to contribute
+
+Report a bug      
+Submit a feature request      
+Open a pull request      
+
+
+
+
+Need help?
+
+Ask the Platform.sh Community      
+Join us on Slack      
+
+
+
+Thanks to all of our amazing contributors!
+
+
+
+
+
+
+
+
+Made with contrib.rocks
+
+
+
diff --git a/templates/drupal11/files/composer.json b/templates/drupal11/files/composer.json
new file mode 100644
index 000000000..89fab90e0
--- /dev/null
+++ b/templates/drupal11/files/composer.json
@@ -0,0 +1,98 @@
+{
+ "name": "platformsh/drupal11",
+ "description": "This template builds Drupal 11 for Platform.sh based the \"Drupal Recommended\" Composer project.",
+ "type": "project",
+ "license": "GPL-2.0-or-later",
+ "homepage": "https://www.drupal.org/project/drupal",
+ "support": {
+ "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
+ "chat": "https://www.drupal.org/node/314178"
+ },
+ "repositories": [
+ {
+ "type": "composer",
+ "url": "https://packages.drupal.org/8"
+ }
+ ],
+ "require": {
+ "composer/installers": "^2.0",
+ "drupal/core-composer-scaffold": "^11.0",
+ "drupal/core-project-message": "^11.0",
+ "drupal/core-recommended": "^11.0",
+ "drush/drush": "^13",
+ "platformsh/config-reader": "^2.4"
+ },
+ "conflict": {
+ "drupal/drupal": "*"
+ },
+ "minimum-stability": "stable",
+ "prefer-stable": true,
+ "config": {
+ "allow-plugins": {
+ "composer/installers": true,
+ "drupal/core-composer-scaffold": true,
+ "drupal/core-project-message": true,
+ "phpstan/extension-installer": true,
+ "dealerdirect/phpcodesniffer-composer-installer": true,
+ "cweagans/composer-patches": true
+ },
+ "sort-packages": true
+ },
+ "extra": {
+ "drupal-scaffold": {
+ "locations": {
+ "web-root": "web/"
+ }
+ },
+ "installer-paths": {
+ "web/core": [
+ "type:drupal-core"
+ ],
+ "web/libraries/{$name}": [
+ "type:drupal-library"
+ ],
+ "web/modules/contrib/{$name}": [
+ "type:drupal-module"
+ ],
+ "web/profiles/contrib/{$name}": [
+ "type:drupal-profile"
+ ],
+ "web/themes/contrib/{$name}": [
+ "type:drupal-theme"
+ ],
+ "drush/Commands/contrib/{$name}": [
+ "type:drupal-drush"
+ ],
+ "web/modules/custom/{$name}": [
+ "type:drupal-custom-module"
+ ],
+ "web/profiles/custom/{$name}": [
+ "type:drupal-custom-profile"
+ ],
+ "web/themes/custom/{$name}": [
+ "type:drupal-custom-theme"
+ ]
+ },
+ "drupal-core-project-message": {
+ "include-keys": [
+ "homepage",
+ "support"
+ ],
+ "post-create-project-cmd-message": [
+ " >",
+ " Congratulations, you\u2019ve installed the Drupal codebase >",
+ " from the drupal/recommended-project template! >",
+ " >",
+ "",
+ "Next steps>:",
+ " * Install the site: https://www.drupal.org/docs/installing-drupal",
+ " * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
+ " * Get support: https://www.drupal.org/support",
+ " * Get involved with the Drupal community:",
+ " https://www.drupal.org/getting-involved",
+ " * Remove the plugin that prints this message:",
+ " composer remove drupal/core-project-message"
+ ]
+ }
+ }
+}
diff --git a/templates/drupal11/files/config/sync/.gitkeep b/templates/drupal11/files/config/sync/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/templates/drupal11/files/drush/platformsh_deploy_drupal.sh b/templates/drupal11/files/drush/platformsh_deploy_drupal.sh
new file mode 100755
index 000000000..0c0827a20
--- /dev/null
+++ b/templates/drupal11/files/drush/platformsh_deploy_drupal.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+#
+# We don't want to run drush commands if drupal isn't installed.
+# Similarly, we don't want to attempt to run config-import if there aren't any config files to import
+# @todo expand further to pass --uri for all sites, with an eye towards multisite
+#
+
+
+if [ -n "$(drush status --field=bootstrap)" ]; then
+ drush -y cache-rebuild
+ drush -y updatedb
+ if [ -n "$(ls $(drush php:eval "echo realpath(Drupal\Core\Site\Settings::get('config_sync_directory'));")/*.yml 2>/dev/null)" ]; then
+ drush -y config-import
+ else
+ echo "No config to import. Skipping."
+ fi
+else
+ echo "Drupal not installed. Skipping standard Drupal deploy steps"
+fi
diff --git a/templates/drupal11/files/drush/platformsh_generate_drush_yml.php b/templates/drupal11/files/drush/platformsh_generate_drush_yml.php
new file mode 100644
index 000000000..9dbb98c17
--- /dev/null
+++ b/templates/drupal11/files/drush/platformsh_generate_drush_yml.php
@@ -0,0 +1,80 @@
+inRuntime()) {
+ return;
+ }
+
+ $routes = $platformsh->getUpstreamRoutes($platformsh->applicationName);
+
+ // Sort URLs, with the primary route first, then by HTTPS before HTTP, then by length.
+ usort($routes, function (array $a, array $b) {
+ // false sorts before true, normally, so negate the comparison.
+ return
+ [!$a['primary'], strpos($a['url'], 'https://') !== 0, strlen($a['url'])]
+ <=>
+ [!$b['primary'], strpos($b['url'], 'https://') !== 0, strlen($b['url'])];
+ });
+
+ // Return the url of the first one.
+ return reset($routes)['url'] ?: NULL;
+}
+
+$appRoot = dirname(__DIR__);
+$filename = $appRoot . '/.drush/drush.yml';
+
+$siteUrl = _platformsh_drush_site_url();
+
+if (empty($siteUrl)) {
+ echo "Failed to find a site URL\n";
+
+ if (file_exists($filename)) {
+ echo "The file exists but may be invalid: $filename\n";
+ }
+
+ exit(1);
+}
+
+$siteUrlYamlEscaped = json_encode($siteUrl, JSON_UNESCAPED_SLASHES);
+$scriptPath = __FILE__;
+
+$success = file_put_contents($filename, <<
+
+
+
diff --git a/templates/drupal11/files/php.ini b/templates/drupal11/files/php.ini
new file mode 100644
index 000000000..b731f3112
--- /dev/null
+++ b/templates/drupal11/files/php.ini
@@ -0,0 +1,14 @@
+assert.active = Off
+display_errors = Off
+display_startup_errors = Off
+max_execution_time = 30
+session.use_strict_mode = On
+zend.detect_unicode = Off
+opcache.memory_consumption = 128
+opcache.interned_strings_buffer = 8
+opcache.max_accelerated_files = 4000
+opcache.revalidate_freq = 60
+opcache.fast_shutdown = 1
+opcache.enable_cli = 1
+realpath_cache_ttl = 3600
+session.gc_probability = 0
diff --git a/templates/drupal11/files/web/.csslintrc b/templates/drupal11/files/web/.csslintrc
new file mode 100644
index 000000000..177e4fcc7
--- /dev/null
+++ b/templates/drupal11/files/web/.csslintrc
@@ -0,0 +1,40 @@
+--errors=box-model,
+ display-property-grouping,
+ duplicate-background-images,
+ duplicate-properties,
+ empty-rules,
+ ids,
+ import,
+ important,
+ known-properties,
+ outline-none,
+ overqualified-elements,
+ qualified-headings,
+ shorthand,
+ star-property-hack,
+ text-indent,
+ underscore-property-hack,
+ unique-headings,
+ unqualified-attributes,
+ vendor-prefix,
+ zero-units
+--ignore=adjoining-classes,
+ box-sizing,
+ bulletproof-font-face,
+ compatible-vendor-prefixes,
+ errors,
+ fallback-colors,
+ floats,
+ font-faces,
+ font-sizes,
+ gradients,
+ import-ie-limit,
+ order-alphabetical,
+ regex-selectors,
+ rules-count,
+ selector-max,
+ selector-max-approaching,
+ selector-newline,
+ universal-selector
+--exclude-list=core/assets,
+ vendor
diff --git a/templates/drupal11/files/web/.eslintignore b/templates/drupal11/files/web/.eslintignore
new file mode 100644
index 000000000..9c134873d
--- /dev/null
+++ b/templates/drupal11/files/web/.eslintignore
@@ -0,0 +1,8 @@
+core/**/*
+vendor/**/*
+sites/**/files/**/*
+libraries/**/*
+sites/**/libraries/**/*
+profiles/**/libraries/**/*
+**/js_test_files/**/*
+**/node_modules/**/*
diff --git a/templates/drupal11/files/web/.eslintrc.json b/templates/drupal11/files/web/.eslintrc.json
new file mode 100644
index 000000000..d4bbc9205
--- /dev/null
+++ b/templates/drupal11/files/web/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./core/.eslintrc.json"
+}
diff --git a/templates/drupal11/files/web/.gitignore b/templates/drupal11/files/web/.gitignore
new file mode 100644
index 000000000..df2e5854a
--- /dev/null
+++ b/templates/drupal11/files/web/.gitignore
@@ -0,0 +1 @@
+/autoload.php
\ No newline at end of file
diff --git a/templates/drupal11/files/web/.ht.router.php b/templates/drupal11/files/web/.ht.router.php
new file mode 100644
index 000000000..2c8a6f6ac
--- /dev/null
+++ b/templates/drupal11/files/web/.ht.router.php
@@ -0,0 +1,71 @@
+
+
+ Require all denied
+
+
+ Order allow,deny
+
+
+
+# Don't show directory listings for URLs which map to a directory.
+Options -Indexes
+
+# Set the default handler.
+DirectoryIndex index.php index.html index.htm
+
+# Add correct encoding for SVGZ.
+AddType image/svg+xml svg svgz
+AddEncoding gzip svgz
+
+# Most of the following PHP settings cannot be changed at runtime. See
+# sites/default/default.settings.php and
+# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
+# changed at runtime.
+
+ php_value assert.active 0
+
+
+# Requires mod_expires to be enabled.
+
+ # Enable expirations.
+ ExpiresActive On
+
+ # Cache all files and redirects for 2 weeks after access (A).
+ ExpiresDefault A1209600
+
+
+ # Do not allow PHP scripts to be cached unless they explicitly send cache
+ # headers themselves. Otherwise all scripts would have to overwrite the
+ # headers set by mod_expires if they want another caching behavior. This may
+ # fail if an error occurs early in the bootstrap process, and it may cause
+ # problems if a non-Drupal PHP file is installed in a subdirectory.
+ ExpiresActive Off
+
+
+
+# Set a fallback resource if mod_rewrite is not enabled. This allows Drupal to
+# work without clean URLs. This requires Apache version >= 2.2.16. If Drupal is
+# not accessed by the top level URL (i.e.: http://example.com/drupal/ instead of
+# http://example.com/), the path to index.php will need to be adjusted.
+
+ FallbackResource /index.php
+
+
+# Various rewrite rules.
+
+ RewriteEngine on
+
+ # Set "protossl" to "s" if we were accessed via https://. This is used later
+ # if you enable "www." stripping or enforcement, in order to ensure that
+ # you don't bounce between http and https.
+ RewriteRule ^ - [E=protossl]
+ RewriteCond %{HTTPS} on
+ RewriteRule ^ - [E=protossl:s]
+
+ # Make sure Authorization HTTP header is available to PHP
+ # even when running as CGI or FastCGI.
+ RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
+ # Block access to "hidden" directories whose names begin with a period. This
+ # includes directories used by version control systems such as Subversion or
+ # Git to store control files. Files whose names begin with a period, as well
+ # as the control files used by CVS, are protected by the FilesMatch directive
+ # above.
+ #
+ # NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
+ # not possible to block access to entire directories from .htaccess because
+ # is not allowed here.
+ #
+ # If you do not have mod_rewrite installed, you should remove these
+ # directories from your webroot or otherwise protect them from being
+ # downloaded.
+ RewriteRule "/\.|^\.(?!well-known/)" - [F]
+
+ # If your site can be accessed both with and without the 'www.' prefix, you
+ # can use one of the following settings to redirect users to your preferred
+ # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
+ #
+ # To redirect all users to access the site WITH the 'www.' prefix,
+ # (http://example.com/foo will be redirected to http://www.example.com/foo)
+ # uncomment the following:
+ # RewriteCond %{HTTP_HOST} .
+ # RewriteCond %{HTTP_HOST} !^www\. [NC]
+ # RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
+ #
+ # To redirect all users to access the site WITHOUT the 'www.' prefix,
+ # (http://www.example.com/foo will be redirected to http://example.com/foo)
+ # uncomment the following:
+ # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
+ # RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
+
+ # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
+ # VirtualDocumentRoot and the rewrite rules are not working properly.
+ # For example if your site is at http://example.com/drupal uncomment and
+ # modify the following line:
+ # RewriteBase /drupal
+ #
+ # If your site is running in a VirtualDocumentRoot at http://example.com/,
+ # uncomment the following line:
+ # RewriteBase /
+
+ # Redirect common PHP files to their new locations.
+ RewriteCond %{REQUEST_URI} ^(.*)?/(install\.php) [OR]
+ RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild\.php)
+ RewriteCond %{REQUEST_URI} !core
+ RewriteRule ^ %1/core/%2 [L,QSA,R=301]
+
+ # Rewrite install.php during installation to see if mod_rewrite is working
+ RewriteRule ^core/install\.php core/install.php?rewrite=ok [QSA,L]
+
+ # Pass all requests not referring directly to files in the filesystem to
+ # index.php.
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_URI} !=/favicon.ico
+ RewriteRule ^ index.php [L]
+
+ # For security reasons, deny access to other PHP files on public sites.
+ # Note: The following URI conditions are not anchored at the start (^),
+ # because Drupal may be located in a subdirectory. To further improve
+ # security, you can replace '!/' with '!^/'.
+ # Allow access to PHP files in /core (like authorize.php or install.php):
+ RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
+ # Allow access to test-specific PHP files:
+ RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?\.php
+ # Allow access to Statistics module's custom front controller.
+ # Copy and adapt this rule to directly execute PHP files in contributed or
+ # custom modules or to run another PHP application in the same directory.
+ RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics\.php$
+ # Deny access to any other PHP files that do not match the rules above.
+ # Specifically, disallow autoload.php from being served directly.
+ RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
+
+ # Rules to correctly serve gzip compressed CSS and JS files.
+ # Requires both mod_rewrite and mod_headers to be enabled.
+
+ # Serve gzip compressed CSS files if they exist and the client accepts gzip.
+ RewriteCond %{HTTP:Accept-encoding} gzip
+ RewriteCond %{REQUEST_FILENAME}\.gz -s
+ RewriteRule ^(.*css_[a-zA-Z0-9-_]+)\.css$ $1\.css\.gz [QSA]
+
+ # Serve gzip compressed JS files if they exist and the client accepts gzip.
+ RewriteCond %{HTTP:Accept-encoding} gzip
+ RewriteCond %{REQUEST_FILENAME}\.gz -s
+ RewriteRule ^(.*js_[a-zA-Z0-9-_]+)\.js$ $1\.js\.gz [QSA]
+
+ # Serve correct content types, and prevent double compression.
+ RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=no-brotli:1]
+ RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
+
+
+ # Serve correct encoding type.
+ Header set Content-Encoding gzip
+ # Force proxies to cache gzipped & non-gzipped css/js files separately.
+ Header append Vary Accept-Encoding
+
+
+
+
+# Various header fixes.
+
+ # Disable content sniffing, since it's an attack vector.
+ Header always set X-Content-Type-Options nosniff
+ # Disable Proxy header, since it's an attack vector.
+ RequestHeader unset Proxy
+
diff --git a/templates/drupal11/files/web/INSTALL.txt b/templates/drupal11/files/web/INSTALL.txt
new file mode 100644
index 000000000..3714df040
--- /dev/null
+++ b/templates/drupal11/files/web/INSTALL.txt
@@ -0,0 +1,3 @@
+
+Please read core/INSTALL.txt for detailed installation instructions for your
+Drupal website.
diff --git a/templates/drupal11/files/web/README.md b/templates/drupal11/files/web/README.md
new file mode 100644
index 000000000..c3e537134
--- /dev/null
+++ b/templates/drupal11/files/web/README.md
@@ -0,0 +1,75 @@
+
+
+Drupal is an open source content management platform supporting a variety of
+websites ranging from personal weblogs to large community-driven websites. For
+more information, visit the Drupal website, [Drupal.org][Drupal.org], and join
+the [Drupal community][Drupal community].
+
+## Contributing
+
+Drupal is developed on [Drupal.org][Drupal.org], the home of the international
+Drupal community since 2001!
+
+[Drupal.org][Drupal.org] hosts Drupal's [GitLab repository][GitLab repository],
+its [issue queue][issue queue], and its [documentation][documentation]. Before
+you start working on code, be sure to search the [issue queue][issue queue] and
+create an issue if your aren't able to find an existing issue.
+
+Every issue on Drupal.org automatically creates a new community-accessible fork
+that you can contribute to. Learn more about the code contribution process on
+the [Issue forks & merge requests page][issue forks].
+
+## Usage
+
+For a brief introduction, see [USAGE.txt](/core/USAGE.txt). You can also find
+guides, API references, and more by visiting Drupal's [documentation
+page][documentation].
+
+You can quickly extend Drupal's core feature set by installing any of its
+[thousands of free and open source modules][modules]. With Drupal and its
+module ecosystem, you can often build most or all of what your project needs
+before writing a single line of code.
+
+## Changelog
+
+Drupal keeps detailed [change records][changelog]. You can search Drupal's
+changes for a record of every notable breaking change and new feature since
+2011.
+
+## Security
+
+For a list of security announcements, see the [Security advisories
+page][Security advisories] (available as [an RSS feed][security RSS]). This
+page also describes how to subscribe to these announcements via email.
+
+For information about the Drupal security process, or to find out how to report
+a potential security issue to the Drupal security team, see the [Security team
+page][security team].
+
+## Need a helping hand?
+
+Visit the [Support page][support] or browse [over a thousand Drupal
+providers][service providers] offering design, strategy, development, and
+hosting services.
+
+## Legal matters
+
+Know your rights when using Drupal by reading Drupal core's
+[license](/core/LICENSE.txt).
+
+Learn about the [Drupal trademark and logo policy here][trademark].
+
+[Drupal.org]: https://www.drupal.org
+[Drupal community]: https://www.drupal.org/community
+[GitLab repository]: https://git.drupalcode.org/project/drupal
+[issue queue]: https://www.drupal.org/project/issues/drupal
+[issue forks]: https://www.drupal.org/drupalorg/docs/gitlab-integration/issue-forks-merge-requests
+[documentation]: https://www.drupal.org/documentation
+[changelog]: https://www.drupal.org/list-changes/drupal
+[modules]: https://www.drupal.org/project/project_module
+[security advisories]: https://www.drupal.org/security
+[security RSS]: https://www.drupal.org/security/rss.xml
+[security team]: https://www.drupal.org/drupal-security-team
+[service providers]: https://www.drupal.org/drupal-services
+[support]: https://www.drupal.org/support
+[trademark]: https://www.drupal.com/trademark
diff --git a/templates/drupal11/files/web/example.gitignore b/templates/drupal11/files/web/example.gitignore
new file mode 100644
index 000000000..d77a48bc8
--- /dev/null
+++ b/templates/drupal11/files/web/example.gitignore
@@ -0,0 +1,42 @@
+# This file contains default .gitignore rules. To use it, copy it to .gitignore,
+# and it will cause files like your settings.php and user-uploaded files to be
+# excluded from Git version control. This is a common strategy to avoid
+# accidentally including private information in public repositories and patch
+# files.
+#
+# Because .gitignore can be specific to your site, this file has a different
+# name; updating Drupal core will not override your custom .gitignore file.
+
+# Ignore core when managing all of a project's dependencies with Composer
+# including Drupal core.
+# core
+
+# Ignore dependencies that are managed with Composer.
+# Generally you should only ignore the root vendor directory. It's important
+# that core/assets/vendor and any other vendor directories within contrib or
+# custom module, theme, etc., are not ignored unless you purposely do so.
+/vendor/
+
+# Ignore configuration files that may contain sensitive information.
+sites/*/settings*.php
+sites/*/services*.yml
+
+# Ignore paths that contain user-generated content.
+sites/*/files
+sites/*/private
+
+# Ignore multi-site test environment.
+sites/simpletest
+
+# If you prefer to store your .gitignore file in the sites/ folder, comment
+# or delete the previous settings and uncomment the following ones, instead.
+
+# Ignore configuration files that may contain sensitive information.
+# */settings*.php
+
+# Ignore paths that contain user-generated content.
+# */files
+# */private
+
+# Ignore multi-site test environment.
+# simpletest
diff --git a/templates/drupal11/files/web/index.php b/templates/drupal11/files/web/index.php
new file mode 100644
index 000000000..750dc282d
--- /dev/null
+++ b/templates/drupal11/files/web/index.php
@@ -0,0 +1,22 @@
+handle($request);
+$response->send();
+
+$kernel->terminate($request, $response);
diff --git a/templates/drupal11/files/web/modules/README.txt b/templates/drupal11/files/web/modules/README.txt
new file mode 100644
index 000000000..529c31b2b
--- /dev/null
+++ b/templates/drupal11/files/web/modules/README.txt
@@ -0,0 +1,42 @@
+Modules extend your site functionality beyond Drupal core.
+
+WHAT TO PLACE IN THIS DIRECTORY?
+--------------------------------
+
+Placing downloaded and custom modules in this directory separates downloaded and
+custom modules from Drupal core's modules. This allows Drupal core to be updated
+without overwriting these files.
+
+DOWNLOAD ADDITIONAL MODULES
+---------------------------
+
+Contributed modules from the Drupal community may be downloaded at
+https://www.drupal.org/project/project_module.
+
+ORGANIZING MODULES IN THIS DIRECTORY
+------------------------------------
+
+You may create subdirectories in this directory, to organize your added modules,
+without breaking the site. Some common subdirectories include "contrib" for
+contributed modules, and "custom" for custom modules. Note that if you move a
+module to a subdirectory after it has been enabled, you may need to clear the
+Drupal cache so it can be found.
+
+There are number of directories that are ignored when looking for modules. These
+are 'src', 'lib', 'vendor', 'assets', 'css', 'files', 'images', 'js', 'misc',
+'templates', 'includes', 'fixtures' and 'Drupal'.
+
+MULTISITE CONFIGURATION
+-----------------------
+
+In multisite configurations, modules found in this directory are available to
+all sites. You may also put modules in the sites/all/modules directory, and the
+versions in sites/all/modules will take precedence over versions of the same
+module that are here. Alternatively, the sites/your_site_name/modules directory
+pattern may be used to restrict modules to a specific site instance.
+
+MORE INFORMATION
+----------------
+
+Refer to the “Developing for Drupal” section of the README.txt in the Drupal
+root directory for further information on extending Drupal with custom modules.
diff --git a/templates/drupal11/files/web/profiles/README.txt b/templates/drupal11/files/web/profiles/README.txt
new file mode 100644
index 000000000..b0f0c0bac
--- /dev/null
+++ b/templates/drupal11/files/web/profiles/README.txt
@@ -0,0 +1,28 @@
+Installation profiles define additional steps that run after the base
+installation of Drupal is completed. They may also offer additional
+functionality and change the behavior of the site.
+
+WHAT TO PLACE IN THIS DIRECTORY?
+--------------------------------
+
+Place downloaded and custom installation profiles in this directory.
+Note that installation profiles are generally provided as part of a Drupal
+distribution.
+
+DOWNLOAD ADDITIONAL DISTRIBUTIONS
+---------------------------------
+
+Contributed distributions from the Drupal community may be downloaded at
+https://www.drupal.org/project/project_distribution.
+
+MULTISITE CONFIGURATION
+-----------------------
+
+In multisite configurations, installation profiles found in this directory are
+available to all sites during their initial site installation.
+
+MORE INFORMATION
+----------------
+
+Refer to the "Installation profiles" section of the README.txt in the Drupal
+root directory for further information on extending Drupal with custom profiles.
diff --git a/templates/drupal11/files/web/robots.txt b/templates/drupal11/files/web/robots.txt
new file mode 100644
index 000000000..ebcd04b96
--- /dev/null
+++ b/templates/drupal11/files/web/robots.txt
@@ -0,0 +1,65 @@
+#
+# robots.txt
+#
+# This file is to prevent the crawling and indexing of certain parts
+# of your site by web crawlers and spiders run by sites like Yahoo!
+# and Google. By telling these "robots" where not to go on your site,
+# you save bandwidth and server resources.
+#
+# This file will be ignored unless it is at the root of your host:
+# Used: http://example.com/robots.txt
+# Ignored: http://example.com/site/robots.txt
+#
+# For more information about the robots.txt standard, see:
+# http://www.robotstxt.org/robotstxt.html
+
+User-agent: *
+# CSS, JS, Images
+Allow: /core/*.css$
+Allow: /core/*.css?
+Allow: /core/*.js$
+Allow: /core/*.js?
+Allow: /core/*.gif
+Allow: /core/*.jpg
+Allow: /core/*.jpeg
+Allow: /core/*.png
+Allow: /core/*.svg
+Allow: /profiles/*.css$
+Allow: /profiles/*.css?
+Allow: /profiles/*.js$
+Allow: /profiles/*.js?
+Allow: /profiles/*.gif
+Allow: /profiles/*.jpg
+Allow: /profiles/*.jpeg
+Allow: /profiles/*.png
+Allow: /profiles/*.svg
+# Directories
+Disallow: /core/
+Disallow: /profiles/
+# Files
+Disallow: /README.txt
+Disallow: /web.config
+# Paths (clean URLs)
+Disallow: /admin/
+Disallow: /comment/reply/
+Disallow: /filter/tips
+Disallow: /node/add/
+Disallow: /search/
+Disallow: /user/register
+Disallow: /user/password
+Disallow: /user/login
+Disallow: /user/logout
+Disallow: /media/oembed
+Disallow: /*/media/oembed
+# Paths (no clean URLs)
+Disallow: /index.php/admin/
+Disallow: /index.php/comment/reply/
+Disallow: /index.php/filter/tips
+Disallow: /index.php/node/add/
+Disallow: /index.php/search/
+Disallow: /index.php/user/password
+Disallow: /index.php/user/register
+Disallow: /index.php/user/login
+Disallow: /index.php/user/logout
+Disallow: /index.php/media/oembed
+Disallow: /index.php/*/media/oembed
diff --git a/templates/drupal11/files/web/sites/README.txt b/templates/drupal11/files/web/sites/README.txt
new file mode 100644
index 000000000..0372902f1
--- /dev/null
+++ b/templates/drupal11/files/web/sites/README.txt
@@ -0,0 +1,10 @@
+This directory structure contains the settings and configuration files specific
+to your site or sites and is an integral part of multisite configurations.
+
+It is now recommended to place your custom and downloaded extensions in the
+/modules, /themes, and /profiles directories located in the Drupal root. The
+sites/all/ subdirectory structure, which was recommended in previous versions
+of Drupal, is still supported.
+
+See core/INSTALL.txt for information about single-site installation or
+multisite configuration.
diff --git a/templates/drupal11/files/web/sites/default/default.services.yml b/templates/drupal11/files/web/sites/default/default.services.yml
new file mode 100644
index 000000000..b4d27e05a
--- /dev/null
+++ b/templates/drupal11/files/web/sites/default/default.services.yml
@@ -0,0 +1,215 @@
+parameters:
+ session.storage.options:
+ # Default ini options for sessions.
+ #
+ # Some distributions of Linux (most notably Debian) ship their PHP
+ # installations with garbage collection (gc) disabled. Since Drupal depends
+ # on PHP's garbage collection for clearing sessions, ensure that garbage
+ # collection occurs by using the most common settings.
+ # @default 1
+ gc_probability: 1
+ # @default 100
+ gc_divisor: 100
+ #
+ # Set session lifetime (in seconds), i.e. the grace period for session
+ # data. Sessions are deleted by the session garbage collector after one
+ # session lifetime has elapsed since the user's last visit. When a session
+ # is deleted, authenticated users are logged out, and the contents of the
+ # user's session is discarded.
+ # @default 200000
+ gc_maxlifetime: 200000
+ #
+ # Set session cookie lifetime (in seconds), i.e. the time from the session
+ # is created to the cookie expires, i.e. when the browser is expected to
+ # discard the cookie. The value 0 means "until the browser is closed".
+ # @default 2000000
+ cookie_lifetime: 2000000
+ #
+ # Drupal automatically generates a unique session cookie name based on the
+ # full domain name used to access the site. This mechanism is sufficient
+ # for most use-cases, including multi-site deployments. However, if it is
+ # desired that a session can be reused across different subdomains, the
+ # cookie domain needs to be set to the shared base domain. Doing so assures
+ # that users remain logged in as they cross between various subdomains.
+ # To maximize compatibility and normalize the behavior across user agents,
+ # the cookie domain should start with a dot.
+ #
+ # @default none
+ # cookie_domain: '.example.com'
+ #
+ # Set the session ID string length. The length can be between 22 to 256. The
+ # PHP recommended value is 48. See
+ # https://www.php.net/manual/session.security.ini.php for more information.
+ # This value should be kept in sync with
+ # \Drupal\Core\Session\SessionConfiguration::__construct()
+ # @default 48
+ sid_length: 48
+ #
+ # Set the number of bits in encoded session ID character. The possible
+ # values are '4' (0-9, a-f), '5' (0-9, a-v), and '6' (0-9, a-z, A-Z, "-",
+ # ","). The PHP recommended value is 6. See
+ # https://www.php.net/manual/session.security.ini.php for more information.
+ # This value should be kept in sync with
+ # \Drupal\Core\Session\SessionConfiguration::__construct()
+ # @default 6
+ sid_bits_per_character: 6
+ twig.config:
+ # Twig debugging:
+ #
+ # When debugging is enabled:
+ # - The markup of each Twig template is surrounded by HTML comments that
+ # contain theming information, such as template file name suggestions.
+ # - Note that this debugging markup will cause automated tests that directly
+ # check rendered HTML to fail. When running automated tests, 'debug'
+ # should be set to FALSE.
+ # - The dump() function can be used in Twig templates to output information
+ # about template variables.
+ # - Twig templates are automatically recompiled whenever the source code
+ # changes (see auto_reload below).
+ #
+ # For more information about debugging Twig templates, see
+ # https://www.drupal.org/node/1906392.
+ #
+ # Enabling Twig debugging is not recommended in production environments.
+ # @default false
+ debug: false
+ # Twig auto-reload:
+ #
+ # Automatically recompile Twig templates whenever the source code changes.
+ # If you don't provide a value for auto_reload, it will be determined
+ # based on the value of debug.
+ #
+ # Enabling auto-reload is not recommended in production environments.
+ # @default null
+ auto_reload: null
+ # Twig cache:
+ #
+ # By default, Twig templates will be compiled and stored in the filesystem
+ # to increase performance. Disabling the Twig cache will recompile the
+ # templates from source each time they are used. In most cases the
+ # auto_reload setting above should be enabled rather than disabling the
+ # Twig cache.
+ #
+ # Disabling the Twig cache is not recommended in production environments.
+ # @default true
+ cache: true
+ # File extensions:
+ #
+ # List of file extensions the Twig system is allowed to load via the
+ # twig.loader.filesystem service. Files with other extensions will not be
+ # loaded unless they are added here. For example, to allow a file named
+ # 'example.partial' to be loaded, add 'partial' to this list. To load files
+ # with no extension, add an empty string '' to the list.
+ #
+ # @default ['css', 'html', 'js', 'svg', 'twig']
+ allowed_file_extensions:
+ - css
+ - html
+ - js
+ - svg
+ - twig
+ renderer.config:
+ # Renderer required cache contexts:
+ #
+ # The Renderer will automatically associate these cache contexts with every
+ # render array, hence varying every render array by these cache contexts.
+ #
+ # @default ['languages:language_interface', 'theme', 'user.permissions']
+ required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions']
+ # Renderer automatic placeholdering conditions:
+ #
+ # Drupal allows portions of the page to be automatically deferred when
+ # rendering to improve cache performance. That is especially helpful for
+ # cache contexts that vary widely, such as the active user. On some sites
+ # those may be different, however, such as sites with only a handful of
+ # users. If you know what the high-cardinality cache contexts are for your
+ # site, specify those here. If you're not sure, the defaults are fairly safe
+ # in general.
+ #
+ # For more information about rendering optimizations see
+ # https://www.drupal.org/developing/api/8/render/arrays/cacheability#optimizing
+ auto_placeholder_conditions:
+ # Max-age at or below which caching is not considered worthwhile.
+ #
+ # Disable by setting to -1.
+ #
+ # @default 0
+ max-age: 0
+ # Cache contexts with a high cardinality.
+ #
+ # Disable by setting to [].
+ #
+ # @default ['session', 'user']
+ contexts: ['session', 'user']
+ # Tags with a high invalidation frequency.
+ #
+ # Disable by setting to [].
+ #
+ # @default []
+ tags: []
+ # Renderer cache debug:
+ #
+ # Allows cache debugging output for each rendered element.
+ #
+ # Enabling render cache debugging is not recommended in production
+ # environments.
+ # @default false
+ debug: false
+ # Cacheability debugging:
+ #
+ # Responses with cacheability metadata (CacheableResponseInterface instances)
+ # get X-Drupal-Cache-Tags, X-Drupal-Cache-Contexts and X-Drupal-Cache-Max-Age
+ # headers.
+ #
+ # For more information about debugging cacheable responses, see
+ # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
+ #
+ # Enabling cacheability debugging is not recommended in production
+ # environments.
+ # @default false
+ http.response.debug_cacheability_headers: false
+ factory.keyvalue: {}
+ # Default key/value storage service to use.
+ # @default keyvalue.database
+ # default: keyvalue.database
+ # Collection-specific overrides.
+ # state: keyvalue.database
+ factory.keyvalue.expirable: {}
+ # Default key/value expirable storage service to use.
+ # @default keyvalue.database.expirable
+ # default: keyvalue.database.expirable
+ # Allowed protocols for URL generation.
+ filter_protocols:
+ - http
+ - https
+ - ftp
+ - news
+ - nntp
+ - tel
+ - telnet
+ - mailto
+ - irc
+ - ssh
+ - sftp
+ - webcal
+ - rtsp
+
+ # Configure Cross-Site HTTP requests (CORS).
+ # Read https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
+ # for more information about the topic in general.
+ # Note: By default the configuration is disabled.
+ cors.config:
+ enabled: false
+ # Specify allowed headers, like 'x-allowed-header'.
+ allowedHeaders: []
+ # Specify allowed request methods, specify ['*'] to allow all possible ones.
+ allowedMethods: []
+ # Configure requests allowed from specific origins. Do not include trailing
+ # slashes with URLs.
+ allowedOrigins: ['*']
+ # Sets the Access-Control-Expose-Headers header.
+ exposedHeaders: false
+ # Sets the Access-Control-Max-Age header.
+ maxAge: false
+ # Sets the Access-Control-Allow-Credentials header.
+ supportsCredentials: false
diff --git a/templates/drupal11/files/web/sites/default/default.settings.php b/templates/drupal11/files/web/sites/default/default.settings.php
new file mode 100644
index 000000000..20d789369
--- /dev/null
+++ b/templates/drupal11/files/web/sites/default/default.settings.php
@@ -0,0 +1,834 @@
+ 'databasename',
+ * 'username' => 'sqlusername',
+ * 'password' => 'sqlpassword',
+ * 'host' => 'localhost',
+ * 'port' => '3306',
+ * 'driver' => 'mysql',
+ * 'prefix' => '',
+ * 'collation' => 'utf8mb4_general_ci',
+ * ];
+ * @endcode
+ */
+$databases = [];
+
+/**
+ * Customizing database settings.
+ *
+ * Many of the values of the $databases array can be customized for your
+ * particular database system. Refer to the sample in the section above as a
+ * starting point.
+ *
+ * The "driver" property indicates what Drupal database driver the
+ * connection should use. This is usually the same as the name of the
+ * database type, such as mysql or sqlite, but not always. The other
+ * properties will vary depending on the driver. For SQLite, you must
+ * specify a database file name in a directory that is writable by the
+ * webserver. For most other drivers, you must specify a
+ * username, password, host, and database name.
+ *
+ * Drupal core implements drivers for mysql, pgsql, and sqlite. Other drivers
+ * can be provided by contributed or custom modules. To use a contributed or
+ * custom driver, the "namespace" property must be set to the namespace of the
+ * driver. The code in this namespace must be autoloadable prior to connecting
+ * to the database, and therefore, prior to when module root namespaces are
+ * added to the autoloader. To add the driver's namespace to the autoloader,
+ * set the "autoload" property to the PSR-4 base directory of the driver's
+ * namespace. This is optional for projects managed with Composer if the
+ * driver's namespace is in Composer's autoloader.
+ *
+ * For each database, you may optionally specify multiple "target" databases.
+ * A target database allows Drupal to try to send certain queries to a
+ * different database if it can but fall back to the default connection if not.
+ * That is useful for primary/replica replication, as Drupal may try to connect
+ * to a replica server when appropriate and if one is not available will simply
+ * fall back to the single primary server (The terms primary/replica are
+ * traditionally referred to as master/slave in database server documentation).
+ *
+ * The general format for the $databases array is as follows:
+ * @code
+ * $databases['default']['default'] = $info_array;
+ * $databases['default']['replica'][] = $info_array;
+ * $databases['default']['replica'][] = $info_array;
+ * $databases['extra']['default'] = $info_array;
+ * @endcode
+ *
+ * In the above example, $info_array is an array of settings described above.
+ * The first line sets a "default" database that has one primary database
+ * (the second level default). The second and third lines create an array
+ * of potential replica databases. Drupal will select one at random for a given
+ * request as needed. The fourth line creates a new database with a name of
+ * "extra".
+ *
+ * For MySQL, MariaDB or equivalent databases the 'isolation_level' option can
+ * be set. The recommended transaction isolation level for Drupal sites is
+ * 'READ COMMITTED'. The 'REPEATABLE READ' option is supported but can result
+ * in deadlocks, the other two options are 'READ UNCOMMITTED' and 'SERIALIZABLE'.
+ * They are available but not supported; use them at your own risk. For more
+ * info:
+ * https://dev.mysql.com/doc/refman/5.7/en/innodb-transaction-isolation-levels.html
+ *
+ * On your settings.php, change the isolation level:
+ * @code
+ * $databases['default']['default']['init_commands'] = [
+ * 'isolation_level' => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
+ * ];
+ * @endcode
+ *
+ * You can optionally set a prefix for all database table names by using the
+ * 'prefix' setting. If a prefix is specified, the table name will be prepended
+ * with its value. Be sure to use valid database characters only, usually
+ * alphanumeric and underscore. If no prefix is desired, do not set the 'prefix'
+ * key or set its value to an empty string ''.
+ *
+ * For example, to have all database table prefixed with 'main_', set:
+ * @code
+ * 'prefix' => 'main_',
+ * @endcode
+ *
+ * Advanced users can add or override initial commands to execute when
+ * connecting to the database server, as well as PDO connection settings. For
+ * example, to enable MySQL SELECT queries to exceed the max_join_size system
+ * variable, and to reduce the database connection timeout to 5 seconds:
+ * @code
+ * $databases['default']['default'] = [
+ * 'init_commands' => [
+ * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
+ * ],
+ * 'pdo' => [
+ * PDO::ATTR_TIMEOUT => 5,
+ * ],
+ * ];
+ * @endcode
+ *
+ * WARNING: The above defaults are designed for database portability. Changing
+ * them may cause unexpected behavior, including potential data loss. See
+ * https://www.drupal.org/developing/api/database/configuration for more
+ * information on these defaults and the potential issues.
+ *
+ * More details can be found in the constructor methods for each driver:
+ * - \Drupal\mysql\Driver\Database\mysql\Connection::__construct()
+ * - \Drupal\pgsql\Driver\Database\pgsql\Connection::__construct()
+ * - \Drupal\sqlite\Driver\Database\sqlite\Connection::__construct()
+ *
+ * Sample Database configuration format for PostgreSQL (pgsql):
+ * @code
+ * $databases['default']['default'] = [
+ * 'driver' => 'pgsql',
+ * 'database' => 'databasename',
+ * 'username' => 'sqlusername',
+ * 'password' => 'sqlpassword',
+ * 'host' => 'localhost',
+ * 'prefix' => '',
+ * ];
+ * @endcode
+ *
+ * Sample Database configuration format for SQLite (sqlite):
+ * @code
+ * $databases['default']['default'] = [
+ * 'driver' => 'sqlite',
+ * 'database' => '/path/to/databasefilename',
+ * ];
+ * @endcode
+ *
+ * Sample Database configuration format for a driver in a contributed module:
+ * @code
+ * $databases['default']['default'] = [
+ * 'driver' => 'my_driver',
+ * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver',
+ * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/',
+ * 'database' => 'databasename',
+ * 'username' => 'sqlusername',
+ * 'password' => 'sqlpassword',
+ * 'host' => 'localhost',
+ * 'prefix' => '',
+ * ];
+ * @endcode
+ */
+
+/**
+ * Location of the site configuration files.
+ *
+ * The $settings['config_sync_directory'] specifies the location of file system
+ * directory used for syncing configuration data. On install, the directory is
+ * created. This is used for configuration imports.
+ *
+ * The default location for this directory is inside a randomly-named
+ * directory in the public files path. The setting below allows you to set
+ * its location.
+ */
+# $settings['config_sync_directory'] = '/directory/outside/webroot';
+
+/**
+ * Settings:
+ *
+ * $settings contains environment-specific configuration, such as the files
+ * directory and reverse proxy address, and temporary configuration, such as
+ * security overrides.
+ *
+ * @see \Drupal\Core\Site\Settings::get()
+ */
+
+/**
+ * Salt for one-time login links, cancel links, form tokens, etc.
+ *
+ * This variable will be set to a random value by the installer. All one-time
+ * login links will be invalidated if the value is changed. Note that if your
+ * site is deployed on a cluster of web servers, you must ensure that this
+ * variable has the same value on each server.
+ *
+ * For enhanced security, you may set this variable to the contents of a file
+ * outside your document root; you should also ensure that this file is not
+ * stored with backups of your database.
+ *
+ * Example:
+ * @code
+ * $settings['hash_salt'] = file_get_contents('/home/example/salt.txt');
+ * @endcode
+ */
+$settings['hash_salt'] = '';
+
+/**
+ * Deployment identifier.
+ *
+ * Drupal's dependency injection container will be automatically invalidated and
+ * rebuilt when the Drupal core version changes. When updating contributed or
+ * custom code that changes the container, changing this identifier will also
+ * allow the container to be invalidated as soon as code is deployed.
+ */
+# $settings['deployment_identifier'] = \Drupal::VERSION;
+
+/**
+ * Access control for update.php script.
+ *
+ * If you are updating your Drupal installation using the update.php script but
+ * are not logged in using either an account with the "Administer software
+ * updates" permission or the site maintenance account (the account that was
+ * created during installation), you will need to modify the access check
+ * statement below. Change the FALSE to a TRUE to disable the access check.
+ * After finishing the upgrade, be sure to open this file again and change the
+ * TRUE back to a FALSE!
+ */
+$settings['update_free_access'] = FALSE;
+
+/**
+ * Fallback to HTTP for Update Manager and for fetching security advisories.
+ *
+ * If your site fails to connect to updates.drupal.org over HTTPS (either when
+ * fetching data on available updates, or when fetching the feed of critical
+ * security announcements), you may uncomment this setting and set it to TRUE to
+ * allow an insecure fallback to HTTP. Note that doing so will open your site up
+ * to a potential man-in-the-middle attack. You should instead attempt to
+ * resolve the issues before enabling this option.
+ * @see https://www.drupal.org/docs/system-requirements/php-requirements#openssl
+ * @see https://en.wikipedia.org/wiki/Man-in-the-middle_attack
+ * @see \Drupal\update\UpdateFetcher
+ * @see \Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher
+ */
+# $settings['update_fetch_with_http_fallback'] = TRUE;
+
+/**
+ * External access proxy settings:
+ *
+ * If your site must access the Internet via a web proxy then you can enter the
+ * proxy settings here. Set the full URL of the proxy, including the port, in
+ * variables:
+ * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP
+ * requests.
+ * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS
+ * requests.
+ * You can pass in the user name and password for basic authentication in the
+ * URLs in these settings.
+ *
+ * You can also define an array of host names that can be accessed directly,
+ * bypassing the proxy, in $settings['http_client_config']['proxy']['no'].
+ */
+# $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080';
+# $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080';
+# $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost'];
+
+/**
+ * Reverse Proxy Configuration:
+ *
+ * Reverse proxy servers are often used to enhance the performance
+ * of heavily visited sites and may also provide other site caching,
+ * security, or encryption benefits. In an environment where Drupal
+ * is behind a reverse proxy, the real IP address of the client should
+ * be determined such that the correct client IP address is available
+ * to Drupal's logging, statistics, and access management systems. In
+ * the most simple scenario, the proxy server will add an
+ * X-Forwarded-For header to the request that contains the client IP
+ * address. However, HTTP headers are vulnerable to spoofing, where a
+ * malicious client could bypass restrictions by setting the
+ * X-Forwarded-For header directly. Therefore, Drupal's proxy
+ * configuration requires the IP addresses of all remote proxies to be
+ * specified in $settings['reverse_proxy_addresses'] to work correctly.
+ *
+ * Enable this setting to get Drupal to determine the client IP from the
+ * X-Forwarded-For header. If you are unsure about this setting, do not have a
+ * reverse proxy, or Drupal operates in a shared hosting environment, this
+ * setting should remain commented out.
+ *
+ * In order for this setting to be used you must specify every possible
+ * reverse proxy IP address in $settings['reverse_proxy_addresses'].
+ * If a complete list of reverse proxies is not available in your
+ * environment (for example, if you use a CDN) you may set the
+ * $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
+ * Be aware, however, that it is likely that this would allow IP
+ * address spoofing unless more advanced precautions are taken.
+ */
+# $settings['reverse_proxy'] = TRUE;
+
+/**
+ * Reverse proxy addresses.
+ *
+ * Specify every reverse proxy IP address in your environment, as an array of
+ * IPv4/IPv6 addresses or subnets in CIDR notation. This setting is required if
+ * $settings['reverse_proxy'] is TRUE.
+ */
+# $settings['reverse_proxy_addresses'] = ['a.b.c.d', 'e.f.g.h/24', ...];
+
+/**
+ * Reverse proxy trusted headers.
+ *
+ * Sets which headers to trust from your reverse proxy.
+ *
+ * Common values are:
+ * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR
+ * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST
+ * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT
+ * - \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO
+ * - \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED
+ *
+ * Note the default value of
+ * @code
+ * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED
+ * @endcode
+ * is not secure by default. The value should be set to only the specific
+ * headers the reverse proxy uses. For example:
+ * @code
+ * \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO
+ * @endcode
+ * This would trust the following headers:
+ * - X_FORWARDED_FOR
+ * - X_FORWARDED_HOST
+ * - X_FORWARDED_PROTO
+ * - X_FORWARDED_PORT
+ *
+ * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR
+ * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST
+ * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT
+ * @see \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO
+ * @see \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED
+ * @see \Symfony\Component\HttpFoundation\Request::setTrustedProxies
+ */
+# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED;
+
+
+/**
+ * Page caching:
+ *
+ * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page
+ * views. This tells a HTTP proxy that it may return a page from its local
+ * cache without contacting the web server, if the user sends the same Cookie
+ * header as the user who originally requested the cached page. Without "Vary:
+ * Cookie", authenticated users would also be served the anonymous page from
+ * the cache. If the site has mostly anonymous users except a few known
+ * editors/administrators, the Vary header can be omitted. This allows for
+ * better caching in HTTP proxies (including reverse proxies), i.e. even if
+ * clients send different cookies, they still get content served from the cache.
+ * However, authenticated users should access the site directly (i.e. not use an
+ * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid
+ * getting cached pages from the proxy.
+ */
+# $settings['omit_vary_cookie'] = TRUE;
+
+
+/**
+ * Cache TTL for client error (4xx) responses.
+ *
+ * Items cached per-URL tend to result in a large number of cache items, and
+ * this can be problematic on 404 pages which by their nature are unbounded. A
+ * fixed TTL can be set for these items, defaulting to one hour, so that cache
+ * backends which do not support LRU can purge older entries. To disable caching
+ * of client error responses set the value to 0. Currently applies only to
+ * page_cache module.
+ */
+# $settings['cache_ttl_4xx'] = 3600;
+
+/**
+ * Expiration of cached forms.
+ *
+ * Drupal's Form API stores details of forms in a cache and these entries are
+ * kept for at least 6 hours by default. Expired entries are cleared by cron.
+ *
+ * @see \Drupal\Core\Form\FormCache::setCache()
+ */
+# $settings['form_cache_expiration'] = 21600;
+
+/**
+ * Class Loader.
+ *
+ * If the APCu extension is detected, the classloader will be optimized to use
+ * it. Set to FALSE to disable this.
+ *
+ * @see https://getcomposer.org/doc/articles/autoloader-optimization.md
+ */
+# $settings['class_loader_auto_detect'] = FALSE;
+
+/**
+ * Authorized file system operations:
+ *
+ * The Update Manager module included with Drupal provides a mechanism for
+ * site administrators to securely install missing updates for the site
+ * directly through the web user interface. On securely-configured servers,
+ * the Update manager will require the administrator to provide SSH or FTP
+ * credentials before allowing the installation to proceed; this allows the
+ * site to update the new files as the user who owns all the Drupal files,
+ * instead of as the user the webserver is running as. On servers where the
+ * webserver user is itself the owner of the Drupal files, the administrator
+ * will not be prompted for SSH or FTP credentials (note that these server
+ * setups are common on shared hosting, but are inherently insecure).
+ *
+ * Some sites might wish to disable the above functionality, and only update
+ * the code directly via SSH or FTP themselves. This setting completely
+ * disables all functionality related to these authorized file operations.
+ *
+ * @see https://www.drupal.org/node/244924
+ *
+ * Remove the leading hash signs to disable.
+ */
+# $settings['allow_authorize_operations'] = FALSE;
+
+/**
+ * Default mode for directories and files written by Drupal.
+ *
+ * Value should be in PHP Octal Notation, with leading zero.
+ */
+# $settings['file_chmod_directory'] = 0775;
+# $settings['file_chmod_file'] = 0664;
+
+/**
+ * Public file base URL:
+ *
+ * An alternative base URL to be used for serving public files. This must
+ * include any leading directory path.
+ *
+ * A different value from the domain used by Drupal to be used for accessing
+ * public files. This can be used for a simple CDN integration, or to improve
+ * security by serving user-uploaded files from a different domain or subdomain
+ * pointing to the same server. Do not include a trailing slash.
+ */
+# $settings['file_public_base_url'] = 'http://downloads.example.com/files';
+
+/**
+ * Public file path:
+ *
+ * A local file system path where public files will be stored. This directory
+ * must exist and be writable by Drupal. This directory must be relative to
+ * the Drupal installation directory and be accessible over the web.
+ */
+# $settings['file_public_path'] = 'sites/default/files';
+
+/**
+ * Additional public file schemes:
+ *
+ * Public schemes are URI schemes that allow download access to all users for
+ * all files within that scheme.
+ *
+ * The "public" scheme is always public, and the "private" scheme is always
+ * private, but other schemes, such as "https", "s3", "example", or others,
+ * can be either public or private depending on the site. By default, they're
+ * private, and access to individual files is controlled via
+ * hook_file_download().
+ *
+ * Typically, if a scheme should be public, a module makes it public by
+ * implementing hook_file_download(), and granting access to all users for all
+ * files. This could be either the same module that provides the stream wrapper
+ * for the scheme, or a different module that decides to make the scheme
+ * public. However, in cases where a site needs to make a scheme public, but
+ * is unable to add code in a module to do so, the scheme may be added to this
+ * variable, the result of which is that system_file_download() grants public
+ * access to all files within that scheme.
+ */
+# $settings['file_additional_public_schemes'] = ['example'];
+
+/**
+ * File schemes whose paths should not be normalized:
+ *
+ * Normally, Drupal normalizes '/./' and '/../' segments in file URIs in order
+ * to prevent unintended file access. For example, 'private://css/../image.png'
+ * is normalized to 'private://image.png' before checking access to the file.
+ *
+ * On Windows, Drupal also replaces '\' with '/' in URIs for the local
+ * filesystem.
+ *
+ * If file URIs with one or more scheme should not be normalized like this, then
+ * list the schemes here. For example, if 'porcelain://china/./plate.png' should
+ * not be normalized to 'porcelain://china/plate.png', then add 'porcelain' to
+ * this array. In this case, make sure that the module providing the 'porcelain'
+ * scheme does not allow unintended file access when using '/../' to move up the
+ * directory tree.
+ */
+# $settings['file_sa_core_2023_005_schemes'] = ['porcelain'];
+
+/**
+ * Private file path:
+ *
+ * A local file system path where private files will be stored. This directory
+ * must be absolute, outside of the Drupal installation directory and not
+ * accessible over the web.
+ *
+ * Note: Caches need to be cleared when this value is changed to make the
+ * private:// stream wrapper available to the system.
+ *
+ * See https://www.drupal.org/documentation/modules/file for more information
+ * about securing private files.
+ */
+# $settings['file_private_path'] = '';
+
+/**
+ * Temporary file path:
+ *
+ * A local file system path where temporary files will be stored. This directory
+ * must be absolute, outside of the Drupal installation directory and not
+ * accessible over the web.
+ *
+ * If this is not set, the default for the operating system will be used.
+ *
+ * @see \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory()
+ */
+# $settings['file_temp_path'] = '/tmp';
+
+/**
+ * Session write interval:
+ *
+ * Set the minimum interval between each session write to database.
+ * For performance reasons it defaults to 180.
+ */
+# $settings['session_write_interval'] = 180;
+
+/**
+ * String overrides:
+ *
+ * To override specific strings on your site with or without enabling the Locale
+ * module, add an entry to this list. This functionality allows you to change
+ * a small number of your site's default English language interface strings.
+ *
+ * Remove the leading hash signs to enable.
+ *
+ * The "en" part of the variable name, is dynamic and can be any langcode of
+ * any added language. (eg locale_custom_strings_de for german).
+ */
+# $settings['locale_custom_strings_en'][''] = [
+# 'forum' => 'Discussion board',
+# '@count min' => '@count minutes',
+# ];
+
+/**
+ * A custom theme for the offline page:
+ *
+ * This applies when the site is explicitly set to maintenance mode through the
+ * administration page or when the database is inactive due to an error.
+ * The template file should also be copied into the theme. It is located inside
+ * 'core/modules/system/templates/maintenance-page.html.twig'.
+ *
+ * Note: This setting does not apply to installation and update pages.
+ */
+# $settings['maintenance_theme'] = 'claro';
+
+/**
+ * PHP settings:
+ *
+ * To see what PHP settings are possible, including whether they can be set at
+ * runtime (by using ini_set()), read the PHP documentation:
+ * http://php.net/manual/ini.list.php
+ * See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime
+ * settings and the .htaccess file for non-runtime settings.
+ * Settings defined there should not be duplicated here so as to avoid conflict
+ * issues.
+ */
+
+/**
+ * If you encounter a situation where users post a large amount of text, and
+ * the result is stripped out upon viewing but can still be edited, Drupal's
+ * output filter may not have sufficient memory to process it. If you
+ * experience this issue, you may wish to uncomment the following two lines
+ * and increase the limits of these variables. For more information, see
+ * http://php.net/manual/pcre.configuration.php.
+ */
+# ini_set('pcre.backtrack_limit', 200000);
+# ini_set('pcre.recursion_limit', 200000);
+
+/**
+ * Configuration overrides.
+ *
+ * To globally override specific configuration values for this site,
+ * set them here. You usually don't need to use this feature. This is
+ * useful in a configuration file for a vhost or directory, rather than
+ * the default settings.php.
+ *
+ * Note that any values you provide in these variable overrides will not be
+ * viewable from the Drupal administration interface. The administration
+ * interface displays the values stored in configuration so that you can stage
+ * changes to other environments that don't have the overrides.
+ *
+ * There are particular configuration values that are risky to override. For
+ * example, overriding the list of installed modules in 'core.extension' is not
+ * supported as module install or uninstall has not occurred. Other examples
+ * include field storage configuration, because it has effects on database
+ * structure, and 'core.menu.static_menu_link_overrides' since this is cached in
+ * a way that is not config override aware. Also, note that changing
+ * configuration values in settings.php will not fire any of the configuration
+ * change events.
+ */
+# $config['system.site']['name'] = 'My Drupal site';
+# $config['user.settings']['anonymous'] = 'Visitor';
+
+/**
+ * Load services definition file.
+ */
+$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
+
+/**
+ * Override the default service container class.
+ *
+ * This is useful for example to trace the service container for performance
+ * tracking purposes, for testing a service container with an error condition or
+ * to test a service container that throws an exception.
+ */
+# $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container';
+
+/**
+ * Override the default yaml parser class.
+ *
+ * Provide a fully qualified class name here if you would like to provide an
+ * alternate implementation YAML parser. The class must implement the
+ * \Drupal\Component\Serialization\SerializationInterface interface.
+ */
+# $settings['yaml_parser_class'] = NULL;
+
+/**
+ * Trusted host configuration.
+ *
+ * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host
+ * header spoofing.
+ *
+ * To enable the trusted host mechanism, you enable your allowable hosts
+ * in $settings['trusted_host_patterns']. This should be an array of regular
+ * expression patterns, without delimiters, representing the hosts you would
+ * like to allow.
+ *
+ * For example:
+ * @code
+ * $settings['trusted_host_patterns'] = [
+ * '^www\.example\.com$',
+ * ];
+ * @endcode
+ * will allow the site to only run from www.example.com.
+ *
+ * If you are running multisite, or if you are running your site from
+ * different domain names (eg, you don't redirect http://www.example.com to
+ * http://example.com), you should specify all of the host patterns that are
+ * allowed by your site.
+ *
+ * For example:
+ * @code
+ * $settings['trusted_host_patterns'] = [
+ * '^example\.com$',
+ * '^.+\.example\.com$',
+ * '^example\.org$',
+ * '^.+\.example\.org$',
+ * ];
+ * @endcode
+ * will allow the site to run off of all variants of example.com and
+ * example.org, with all subdomains included.
+ *
+ * @see https://www.drupal.org/docs/installing-drupal/trusted-host-settings
+ */
+
+/**
+ * The default list of directories that will be ignored by Drupal's file API.
+ *
+ * By default ignore node_modules and bower_components folders to avoid issues
+ * with common frontend tools and recursive scanning of directories looking for
+ * extensions.
+ *
+ * @see \Drupal\Core\File\FileSystemInterface::scanDirectory()
+ * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory()
+ */
+$settings['file_scan_ignore_directories'] = [
+ 'node_modules',
+ 'bower_components',
+];
+
+/**
+ * The default number of entities to update in a batch process.
+ *
+ * This is used by update and post-update functions that need to go through and
+ * change all the entities on a site, so it is useful to increase this number
+ * if your hosting configuration (i.e. RAM allocation, CPU speed) allows for a
+ * larger number of entities to be processed in a single batch run.
+ */
+$settings['entity_update_batch_size'] = 50;
+
+/**
+ * Entity update backup.
+ *
+ * This is used to inform the entity storage handler that the backup tables as
+ * well as the original entity type and field storage definitions should be
+ * retained after a successful entity update process.
+ */
+$settings['entity_update_backup'] = TRUE;
+
+/**
+ * Node migration type.
+ *
+ * This is used to force the migration system to use the classic node migrations
+ * instead of the default complete node migrations. The migration system will
+ * use the classic node migration only if there are existing migrate_map tables
+ * for the classic node migrations and they contain data. These tables may not
+ * exist if you are developing custom migrations and do not want to use the
+ * complete node migrations. Set this to TRUE to force the use of the classic
+ * node migrations.
+ */
+$settings['migrate_node_migrate_type_classic'] = FALSE;
+
+/**
+ * The default settings for migration sources.
+ *
+ * These settings are used as the default settings on the Credential form at
+ * /upgrade/credentials.
+ *
+ * - migrate_source_version - The version of the source database. This can be
+ * '6' or '7'. Defaults to '7'.
+ * - migrate_source_connection - The key in the $databases array for the source
+ * site.
+ * - migrate_file_public_path - The location of the source Drupal 6 or Drupal 7
+ * public files. This can be a local file directory containing the source
+ * Drupal 6 or Drupal 7 site (e.g /var/www/docroot), or the site address
+ * (e.g http://example.com).
+ * - migrate_file_private_path - The location of the source Drupal 7 private
+ * files. This can be a local file directory containing the source Drupal 7
+ * site (e.g /var/www/docroot), or empty to use the same value as Public
+ * files directory.
+ *
+ * Sample configuration for a drupal 6 source site with the source files in a
+ * local directory.
+ *
+ * @code
+ * $settings['migrate_source_version'] = '6';
+ * $settings['migrate_source_connection'] = 'migrate';
+ * $settings['migrate_file_public_path'] = '/var/www/drupal6';
+ * @endcode
+ *
+ * Sample configuration for a drupal 7 source site with public source files on
+ * the source site and the private files in a local directory.
+ *
+ * @code
+ * $settings['migrate_source_version'] = '7';
+ * $settings['migrate_source_connection'] = 'migrate';
+ * $settings['migrate_file_public_path'] = 'https://drupal7.com';
+ * $settings['migrate_file_private_path'] = '/var/www/drupal7';
+ * @endcode
+ */
+# $settings['migrate_source_connection'] = '';
+# $settings['migrate_source_version'] = '';
+# $settings['migrate_file_public_path'] = '';
+# $settings['migrate_file_private_path'] = '';
+
+/**
+ * Load local development override configuration, if available.
+ *
+ * Create a settings.local.php file to override variables on secondary (staging,
+ * development, etc.) installations of this site.
+ *
+ * Typical uses of settings.local.php include:
+ * - Disabling caching.
+ * - Disabling JavaScript/CSS compression.
+ * - Rerouting outgoing emails.
+ *
+ * Keep this code block at the end of this file to take full effect.
+ */
+#
+# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
+# include $app_root . '/' . $site_path . '/settings.local.php';
+# }
diff --git a/templates/drupal11/files/web/sites/default/settings.php b/templates/drupal11/files/web/sites/default/settings.php
new file mode 100644
index 000000000..e7e66abf8
--- /dev/null
+++ b/templates/drupal11/files/web/sites/default/settings.php
@@ -0,0 +1,38 @@
+hasRelationship('database')) {
+ $creds = $platformsh->credentials('database');
+ $databases['default']['default'] = [
+ 'driver' => $creds['scheme'],
+ 'database' => $creds['path'],
+ 'username' => $creds['username'],
+ 'password' => $creds['password'],
+ 'host' => $creds['host'],
+ 'port' => $creds['port'],
+ 'pdo' => [PDO::MYSQL_ATTR_COMPRESS => !empty($creds['query']['compression'])],
+ 'init_commands' => [
+ 'isolation_level' => 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
+ ],
+ ];
+}
+
+// Enable verbose error messages on development branches, but not on the production branch.
+// You may add more debug-centric settings here if desired to have them automatically enable
+// on development but not production.
+if (isset($platformsh->branch)) {
+ // Production type environment.
+ if ($platformsh->onProduction() || $platformsh->onDedicated()) {
+ $config['system.logging']['error_level'] = 'hide';
+ } // Development type environment.
+ else {
+ $config['system.logging']['error_level'] = 'verbose';
+ }
+}
+
+// Enable Redis caching.
+if ($platformsh->hasRelationship('redis') && !InstallerKernel::installationAttempted() && extension_loaded('redis') && class_exists('Drupal\redis\ClientFactory')) {
+ $redis = $platformsh->credentials('redis');
+
+ // Set Redis as the default backend for any cache bin not otherwise specified.
+ $settings['cache']['default'] = 'cache.backend.redis';
+ $settings['redis.connection']['host'] = $redis['host'];
+ $settings['redis.connection']['port'] = $redis['port'];
+
+ // Apply changes to the container configuration to better leverage Redis.
+ // This includes using Redis for the lock and flood control systems, as well
+ // as the cache tag checksum. Alternatively, copy the contents of that file
+ // to your project-specific services.yml file, modify as appropriate, and
+ // remove this line.
+ $settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml';
+
+ // Allow the services to work before the Redis module itself is enabled.
+ $settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml';
+
+ // Manually add the classloader path, this is required for the container cache bin definition below
+ // and allows to use it without the redis module being enabled.
+ $class_loader->addPsr4('Drupal\\redis\\', 'modules/contrib/redis/src');
+
+ // Use redis for container cache.
+ // The container cache is used to load the container definition itself, and
+ // thus any configuration stored in the container itself is not available
+ // yet. These lines force the container cache to use Redis rather than the
+ // default SQL cache.
+ $settings['bootstrap_container_definition'] = [
+ 'parameters' => [],
+ 'services' => [
+ 'redis.factory' => [
+ 'class' => 'Drupal\redis\ClientFactory',
+ ],
+ 'cache.backend.redis' => [
+ 'class' => 'Drupal\redis\Cache\CacheBackendFactory',
+ 'arguments' => ['@redis.factory', '@cache_tags_provider.container', '@serialization.phpserialize'],
+ ],
+ 'cache.container' => [
+ 'class' => '\Drupal\redis\Cache\PhpRedis',
+ 'factory' => ['@cache.backend.redis', 'get'],
+ 'arguments' => ['container'],
+ ],
+ 'cache_tags_provider.container' => [
+ 'class' => 'Drupal\redis\Cache\RedisCacheTagsChecksum',
+ 'arguments' => ['@redis.factory'],
+ ],
+ 'serialization.phpserialize' => [
+ 'class' => 'Drupal\Component\Serialization\PhpSerialize',
+ ],
+ ],
+ ];
+}
+
+if ($platformsh->inRuntime()) {
+ // Configure private and temporary file paths.
+ if (!isset($settings['file_private_path'])) {
+ $settings['file_private_path'] = $platformsh->appDir . '/private';
+ }
+ if (!isset($settings['file_temp_path'])) {
+ $settings['file_temp_path'] = $platformsh->appDir . '/tmp';
+ }
+
+// Configure the default PhpStorage and Twig template cache directories.
+ if (!isset($settings['php_storage']['default'])) {
+ $settings['php_storage']['default']['directory'] = $settings['file_private_path'];
+ }
+ if (!isset($settings['php_storage']['twig'])) {
+ $settings['php_storage']['twig']['directory'] = $settings['file_private_path'];
+ }
+
+ // Set the project-specific entropy value, used for generating one-time
+ // keys and such.
+ $settings['hash_salt'] = empty($settings['hash_salt']) ? $platformsh->projectEntropy : $settings['hash_salt'];
+
+ // Set the deployment identifier, which is used by some Drupal cache systems.
+ $settings['deployment_identifier'] = $settings['deployment_identifier'] ?? $platformsh->treeId;
+}
+
+// The 'trusted_hosts_pattern' setting allows an admin to restrict the Host header values
+// that are considered trusted. If an attacker sends a request with a custom-crafted Host
+// header then it can be an injection vector, depending on how the Host header is used.
+// However, Platform.sh already replaces the Host header with the route that was used to reach
+// Platform.sh, so it is guaranteed to be safe. The following line explicitly allows all
+// Host headers, as the only possible Host header is already guaranteed safe.
+$settings['trusted_host_patterns'] = ['.*'];
+
+// Import variables prefixed with 'drupalsettings:' into $settings
+// and 'drupalconfig:' into $config.
+foreach ($platformsh->variables() as $name => $value) {
+ $parts = explode(':', $name);
+ list($prefix, $key) = array_pad($parts, 3, null);
+ switch ($prefix) {
+ // Variables that begin with `drupalsettings` or `drupal` get mapped
+ // to the $settings array verbatim, even if the value is an array.
+ // For example, a variable named drupalsettings:example-setting' with
+ // value 'foo' becomes $settings['example-setting'] = 'foo';
+ case 'drupalsettings':
+ case 'drupal':
+ $settings[$key] = $value;
+ break;
+ // Variables that begin with `drupalconfig` get mapped to the $config
+ // array. Deeply nested variable names, with colon delimiters,
+ // get mapped to deeply nested array elements. Array values
+ // get added to the end just like a scalar. Variables without
+ // both a config object name and property are skipped.
+ // Example: Variable `drupalconfig:conf_file:prop` with value `foo` becomes
+ // $config['conf_file']['prop'] = 'foo';
+ // Example: Variable `drupalconfig:conf_file:prop:subprop` with value `foo` becomes
+ // $config['conf_file']['prop']['subprop'] = 'foo';
+ // Example: Variable `drupalconfig:conf_file:prop:subprop` with value ['foo' => 'bar'] becomes
+ // $config['conf_file']['prop']['subprop']['foo'] = 'bar';
+ // Example: Variable `drupalconfig:prop` is ignored.
+ case 'drupalconfig':
+ if (count($parts) > 2) {
+ $temp = &$config[$key];
+ foreach (array_slice($parts, 2) as $n) {
+ $prev = &$temp;
+ $temp = &$temp[$n];
+ }
+ $prev[$n] = $value;
+ }
+ break;
+ }
+}
diff --git a/templates/drupal11/files/web/sites/development.services.yml b/templates/drupal11/files/web/sites/development.services.yml
new file mode 100644
index 000000000..d2857c66f
--- /dev/null
+++ b/templates/drupal11/files/web/sites/development.services.yml
@@ -0,0 +1,9 @@
+# Local development services.
+#
+# To activate this feature, follow the instructions at the top of the
+# 'example.settings.local.php' file, which sits next to this file.
+parameters:
+ http.response.debug_cacheability_headers: true
+services:
+ cache.backend.null:
+ class: Drupal\Core\Cache\NullBackendFactory
diff --git a/templates/drupal11/files/web/sites/example.settings.local.php b/templates/drupal11/files/web/sites/example.settings.local.php
new file mode 100644
index 000000000..7cb0e6857
--- /dev/null
+++ b/templates/drupal11/files/web/sites/example.settings.local.php
@@ -0,0 +1,155 @@
+..' => 'directory'. As an
+ * example, to map https://www.drupal.org:8080/mysite/test to the configuration
+ * directory sites/example.com, the array should be defined as:
+ * @code
+ * $sites = [
+ * '8080.www.drupal.org.mysite.test' => 'example.com',
+ * ];
+ * @endcode
+ * The URL, https://www.drupal.org:8080/mysite/test/, could be a symbolic link
+ * or an Apache Alias directive that points to the Drupal root containing
+ * index.php. An alias could also be created for a subdomain. See the
+ * @link https://www.drupal.org/documentation/install online Drupal installation guide @endlink
+ * for more information on setting up domains, subdomains, and subdirectories.
+ *
+ * The following examples look for a site configuration in sites/example.com:
+ * @code
+ * URL: http://dev.drupal.org
+ * $sites['dev.drupal.org'] = 'example.com';
+ *
+ * URL: http://localhost/example
+ * $sites['localhost.example'] = 'example.com';
+ *
+ * URL: http://localhost:8080/example
+ * $sites['8080.localhost.example'] = 'example.com';
+ *
+ * URL: https://www.drupal.org:8080/mysite/test/
+ * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
+ * @endcode
+ *
+ * @see default.settings.php
+ * @see \Drupal\Core\DrupalKernel::getSitePath()
+ * @see https://www.drupal.org/documentation/install/multi-site
+ */
diff --git a/templates/drupal11/files/web/themes/README.txt b/templates/drupal11/files/web/themes/README.txt
new file mode 100644
index 000000000..039aaaf83
--- /dev/null
+++ b/templates/drupal11/files/web/themes/README.txt
@@ -0,0 +1,31 @@
+Themes allow you to change the look and feel of your Drupal site. You can use
+themes contributed by others or create your own.
+
+WHAT TO PLACE IN THIS DIRECTORY?
+--------------------------------
+
+Placing downloaded and custom themes in this directory separates downloaded and
+custom themes from Drupal core's themes. This allows Drupal core to be updated
+without overwriting these files.
+
+DOWNLOAD ADDITIONAL THEMES
+--------------------------
+
+Contributed themes from the Drupal community may be downloaded at
+https://www.drupal.org/project/project_theme.
+
+MULTISITE CONFIGURATION
+-----------------------
+
+In multisite configurations, themes found in this directory are available to
+all sites. You may also put themes in the sites/all/themes directory, and the
+versions in sites/all/themes will take precedence over versions of the same
+themes that are here. Alternatively, the sites/your_site_name/themes directory
+pattern may be used to restrict themes to a specific site instance.
+
+MORE INFORMATION
+-----------------
+
+Refer to the "Appearance" section of the README.txt in the Drupal root directory
+for further information on customizing the appearance of Drupal with custom
+themes.
diff --git a/templates/drupal11/files/web/update.php b/templates/drupal11/files/web/update.php
new file mode 100644
index 000000000..b65649cb8
--- /dev/null
+++ b/templates/drupal11/files/web/update.php
@@ -0,0 +1,30 @@
+handle($request);
+$response->send();
+
+$kernel->terminate($request, $response);
diff --git a/templates/drupal11/files/web/web.config b/templates/drupal11/files/web/web.config
new file mode 100644
index 000000000..b769e45e3
--- /dev/null
+++ b/templates/drupal11/files/web/web.config
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/templates/drupal11/info/info.yaml b/templates/drupal11/info/info.yaml
new file mode 100644
index 000000000..b2ab758ea
--- /dev/null
+++ b/templates/drupal11/info/info.yaml
@@ -0,0 +1,93 @@
+title: "Deploy Drupal 11 on Platform.sh"
+id: platformsh/drupal11
+profile: Drupal 11
+name: Drupal 11
+default_branch: master
+tags:
+ - PHP
+ - Drupal
+ - CMS
+ - Symfony
+related_blog_tags:
+ - Drupal
+license:
+ type: "MIT"
+ location: "LICENSE"
+features:
+ - PHP 8.3
+ - MariaDB 10.6
+ - Redis 7.2
+ - Drush included
+ - Automatic TLS certificates
+ - Composer-based build
+# Use Markdown for links and formatting. They will be converted to HTML automatically when the .platform.template.yaml file is generated.
+description:
+ - This template builds Drupal 11 using the "Drupal Recommended" Composer project. It is pre-configured to use MariaDB and Redis for caching. The Drupal installer will skip asking for database credentials as they are already provided.
+ - Drupal is a flexible and extensible PHP-based CMS framework.
+logo:
+ link: "https://www.drupal.org/"
+ images:
+ - "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yIDMuOUMxNi4yIDMuOSAxNC44MiAzLjMgMTQuMDQgMi44MkMxNC4wNCAyLjgyIDEzLjAyIDIuMjIgMTEuMzQgMEMxMS4zNCAwIDExLjQgMi41MiA4LjcgMy44NEM0LjQ0IDUuNTIgMS44IDkuMDYgMS44IDEzLjU2QzEuOCAxOS4yNiA2LjQ4IDIzLjk0IDEyLjE4IDIzLjk0QzE3Ljk0IDIzLjk0IDIyLjU2IDE5LjI2IDIyLjU2IDEzLjU2QzIyLjYyIDYuNiAxNi4yIDMuOSAxNi4yIDMuOVpNNC42OCA5LjZDMy4wNiA5Ljk2IDMuMTggOS4xMiAzLjQ4IDguNEMzLjYgNy45OCA0LjAyIDcuNSA0LjAyIDcuNUM1LjEgNS43NiA3LjUgNC41IDcuNSA0LjVDNy44IDQuMzggOC4zNCA0LjA4IDguODIgMy44NEM5Ljc4IDMuMyAxMC4wMiAzIDEwLjAyIDNDMTEuNCAxLjY4IDExLjI4IDAuMDYgMTEuMjggMEMxMi40OCAyLjQgMTEuMDQgMy40OCAxMS4wNCAzLjQ4QzExLjQgMy44NCAxMS4yOCA0LjIgMTEuMjggNC4yQzkuNDIgOC4yMiA0LjY4IDkuNiA0LjY4IDkuNlpNMTcuMjIgMjIuMkMxNy4xIDIyLjI2IDE1LjYgMjIuOTggMTMuODYgMjIuOThDMTIuOSAyMi45OCAxMS44OCAyMi43NCAxMC45OCAyMi4xNEMxMC42OCAyMS45IDEwLjU2IDIxLjQ4IDEwLjc0IDIxLjE4QzEwLjggMjEuMDYgMTEuMTYgMjAuNjQgMTIgMjEuMThDMTIuMDYgMjEuMjQgMTQuMDQgMjIuNTYgMTcuMSAyMC44OEMxNy4zNCAyMC43NiAxNy42NCAyMC44MiAxNy43NiAyMS4wNkMxNy45NCAyMS4zIDE4IDIxLjc4IDE3LjIyIDIyLjJaTTEzLjAyIDE5LjY4TDEzLjA4IDE5LjYyQzEzLjE0IDE5LjU2IDE0LjE2IDE4LjI0IDE1LjY2IDE4LjQyQzE1LjkgMTguNDIgMTYuNzQgMTguNDggMTcuMjggMTkuNUMxNy4zNCAxOS42MiAxNy40NiAyMC4wNCAxNy4yMiAyMC4zNEMxNy4xIDIwLjQ2IDE2LjkyIDIwLjU4IDE2LjU2IDIwLjQ2QzE2LjMyIDIwLjQgMTYuMiAyMC4xNiAxNi4yIDIwLjA0QzE2LjE0IDE5Ljg2IDE2LjA4IDE5Ljc0IDE1LjQ4IDE5LjY4QzE1IDE5LjYyIDE0LjcgMTkuODYgMTQuMzQgMjAuMTZDMTQuMTYgMjAuMzQgMTMuOTIgMjAuNTIgMTMuNjggMjAuNThDMTMuNjIgMjAuNjQgMTMuNTYgMjAuNjQgMTMuNDQgMjAuNjRDMTMuMzIgMjAuNjQgMTMuMiAyMC41OCAxMy4wOCAyMC41MkMxMi45IDIwLjM0IDEyLjg0IDIwLjEgMTMuMDIgMTkuNjhaTTE5Ljg2IDE5LjhDMTkuODYgMTkuOCAxOS4zMiAxOS45OCAxOC43OCAxOS4zOEMxOC43OCAxOS4zOCAxNy4xNiAxNy41MiAxNi4zOCAxNy4yMkMxNi4zOCAxNy4yMiAxNS45IDE3LjA0IDE1LjMgMTcuMjhDMTUuMyAxNy4yOCAxNC44OCAxNy4zNCAxMy4yNiAxOC40MkMxMy4yNiAxOC40MiAxMC41IDIwLjE2IDkuMTIgMTkuOTJDOS4xMiAxOS45MiA2IDE5Ljk4IDYuNDIgMTYuNjhDNi40MiAxNi42OCA3LjA4IDEyLjk2IDExLjQgMTMuOEMxMS40IDEzLjggMTIuMzYgMTMuOTggMTQuMSAxNS4zNkMxNC4xIDE1LjM2IDE1LjMgMTYuMjYgMTUuOSAxNi4yNkMxNS45IDE2LjI2IDE2LjM4IDE2LjMyIDE3LjQ2IDE1LjY2QzE3LjQ2IDE1LjY2IDE5LjU2IDE0LjA0IDIwLjM0IDE0LjFDMjAuNDYgMTQuMSAyMS44NCAxNC4wNCAyMS44NCAxNi4zMkMyMS43OCAxNi4yNiAyMS44NCAxOC45IDE5Ljg2IDE5LjhaIiBmaWxsPSIjMDA4RUNFIi8+Cjwvc3ZnPgo="
+sections:
+ "create-project": "composer create-project platformsh/drupal11 -s dev"
+ metrics: false
+ blackfire: true
+ postinstall: "templates/drupal11/info/post_install.md"
+ local:
+ - "common/readme/drupal/local_ddev.md"
+ - "common/readme/drupal/local_lando.md"
+ resources:
+ - "[Drupal](https://www.drupal.org/)"
+ - "[Drupal on Platform.sh](https://docs.platform.sh/guides/drupal/deploy.html)"
+ - "[Platform.sh PHP documentation](https://docs.platform.sh/languages/php.html)"
+ migration:
+ mounts:
+ - "web/sites/default/files"
+ - "private"
+ files:
+ "web/sites/default/settings.platformsh.php":
+ - "**Added:**
"
+ - "Contains Platform.sh-specific configuration, namely setting up the database connection to the MariaDB service and caching via Redis."
+ "config/sync/.gitkeep":
+ - "**Added**"
+ "web/sites/default/settings.php":
+ - "**Updated:**
"
+ - "The Drupal settings file has been updated to import and use `web/sites/default/settings.platformsh.php`."
+ ".environment":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.environment.md"
+ - "Here, the Composer config and `PATH` are updated to allow executable app dependencies from Composer to be run from the path (i.e. `drush`)."
+ ".blackfire.yml":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.blackfire.yml.md"
+ ".gitignore":
+ - "**Added:**
"
+ - "A `.gitignore` file is not included in the upstream, so one has been added."
+ ".lando.upstream.yml":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.lando.upstream.yml.md"
+ ".platform.app.yaml":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.platform.app.yaml.md"
+ - "This template uses Composer 2 to install dependencies using the default `composer` [build flavor](https://docs.platform.sh/languages/php.html#build-flavor) prior to the `build` hook."
+ - "Drush tasks are run during the `deploy` hook, and referenced again during the defined `cron` job."
+ "drush/platformsh_generate_drush_yml.php":
+ - "**Added:**
"
+ - "This file has been included to generate the drush yaml configuration on every deployment."
+ ".ddev/providers/platform.yaml":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.ddev.providers.platform.yaml.md"
+ "php.ini":
+ - "**Added:**
"
+ - file: "common/readme/drupal/php.ini.md"
+ ".platform/services.yaml":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.platform.services.yaml.md"
+ - "In this template, MariaDB and Redis have been configured."
+ ".platform/routes.yaml":
+ - "**Added:**
"
+ - file: "common/readme/file_descriptions/.platform.routes.yaml.md"
+ troubleshoot:
+ - file: "common/readme/troubleshoot_ssh.md"
+ - file: "common/readme/drupal/troubleshoot_cache.md"
+ - file: "common/readme/drupal/troubleshoot_hashsalt.md"
diff --git a/templates/drupal11/info/local_nextjs.md b/templates/drupal11/info/local_nextjs.md
new file mode 100644
index 000000000..5a5ec58d4
--- /dev/null
+++ b/templates/drupal11/info/local_nextjs.md
@@ -0,0 +1,24 @@
+
+Next.js: building the frontend locally
+
+After you have created a new environment, you can connect to a backend Drupal instance and develop the frontend locally with the following steps.
+
+1. `cd client`
+1. Update the environment variables for the current environment by running `./get_local_config.sh`. This will pull the generated `.env.local` file for the current environment.
+
+ ```bash
+ # This .env file is generated programmatically within the backend Drupal app for each Platform.sh environment
+ # and stored within an network storage mount so it can be used locally.
+
+ NEXT_PUBLIC_DRUPAL_BASE_URL=https://api.ENVIRONMENT-HASH-PROJECTID.REGION.platformsh.site
+ NEXT_IMAGE_DOMAIN=api.ENVIRONMENT-HASH-PROJECTID.REGION.platformsh.site
+ DRUPAL_SITE_ID=nextjs_site
+ DRUPAL_FRONT_PAGE=/node
+ DRUPAL_CLIENT_ID=CONSUMER_CLIENT_ID
+ DRUPAL_CLIENT_SECRET=GENERATED_SECRET
+ ```
+
+1. Install dependencies: `yarn --frozen-lockfile`.
+1. Run the development server: `yarn dev`. Next.js will then run on http://localhost:3000.
+
+
diff --git a/templates/drupal11/info/post_install.md b/templates/drupal11/info/post_install.md
new file mode 100644
index 000000000..795b018e1
--- /dev/null
+++ b/templates/drupal11/info/post_install.md
@@ -0,0 +1,3 @@
+### Post-install
+
+Run through the Drupal installer as normal. You will not be asked for database credentials as those are already provided.
diff --git a/templates/drupal11/platformsh.wizard.yaml b/templates/drupal11/platformsh.wizard.yaml
new file mode 100644
index 000000000..8a7071183
--- /dev/null
+++ b/templates/drupal11/platformsh.wizard.yaml
@@ -0,0 +1,89 @@
+steps:
+ - id: "understanding_platformsh"
+ label: "Preparing for development"
+ title: "Preparing for development on Platform.sh"
+ required: true
+ bodyText: "Congrats! We’ve started the first deployment to production for you.
\nOnce complete, select your default environment to see your production URL. Feel free to visit your website to complete the Drupal 10 installation steps.
\nGit-driven development
\nPlatform.sh supports Git-driven development by design. Changes happen right in your code. When SSH’ing into your website, all files are read-only by default.
\nMark the directories that you want to edit as write access. (See mounts documentation).
"
+ copyCode: []
+ - id: "download_cli"
+ label: "Download the CLI"
+ title: "Download the Platform.sh CLI"
+ required: false
+ bodyText: "To install the CLI, use the command for either macOS or Windows as shown.
\nFor more info about our CLI check out our documentation or take a look at our CLI source code.
"
+ copyCode:
+ - label: "macOS and Linux Installer (using Homebrew)"
+ code:
+ - "brew install platformsh/tap/platformsh-cli"
+ - label: "Windows Installer (using Scoop)"
+ code:
+ - "scoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git"
+ - "scoop install platform"
+ - id: "download_project"
+ label: "Download your project"
+ title: "Download your project to start using it"
+ required: true
+ bodyText: "The easiest way to download your project and prepare your SSH authentication is to use the Platform CLI.
\nThe platform get
command will not only download your project but will also take care of your SSH authentication.
\nManually authenticate by adding your SSH key to your account.
"
+ copyCode:
+ - label: "Download your project"
+ code:
+ - "platform get"
+ - ""
+ - "# Using Git? Add your SSH Key and git clone "
+ - id: "prepare_staging"
+ label: "Creating dev branches"
+ title: "Clone production to your first development environment!"
+ required: true
+ bodyText: "You'll now create a perfect live replica of production on Platform.sh and switch to that branch locally. Cool, huh!
\nYou can now modify your code and test your changes locally before pushing them to your live site on Platform.sh.
"
+ copyCode:
+ - label: 'Clone production environment to "develop" on Platform.sh and check it out locally.'
+ code:
+ - "platform environment:branch develop"
+ - label: "Using Git?"
+ code:
+ - "git checkout -b develop"
+ - "git push platform develop"
+ - ""
+ - "# Head to console.platform.sh to see live URL for your develop branch"
+ - id: "development"
+ label: "The first development change!"
+ title: "Making your first change in development"
+ required: false
+ bodyText: "Let's try modifying your code and reviewing it locally. We’ll install the Pathauto extension.
"
+ copyCode:
+ - label: "Install the Pathauto extension to see it listed within the Drupal “Extend” page."
+ code:
+ - "composer require drupal/pathauto"
+ - ""
+ - '# Confirm it’s installed. "- Installing drupal/pathauto…"'
+ - id: "deploy"
+ label: "Deploy your changes"
+ title: "You're ready to deploy some code!"
+ required: false
+ bodyText: "Congrats. You’ve installed drupal/pathauto
.
\nLet's publish those changes to Platform.sh and review them before merging them into production!
"
+ copyCode:
+ - label: "Save your changes and review your live develop website."
+ code:
+ - 'git add composer.json composer.lock && git commit -m "My first Platform.sh update";'
+ - ""
+ - "platform push"
+ - label: "Happy? Merge into production!"
+ code:
+ - "platform merge"
+ - ""
+ - "#Using git?"
+ - "git checkout main"
+ - "git merge develop"
+ - "git push platform main"
+ - id: "understanding_infrastructure"
+ label: "Know your infrastructure"
+ title: "Customize your infrastructure on Platform.sh"
+ required: false
+ bodyText: "Finally, your project is a typical Drupal 10 installation, with 3 new files to help you deploy on Platform.sh.
\n.platform.app.yaml
Build steps, jobs, storage mounts, and more
\n.platform/services.yaml
Add services, e.g., databases, Redis
\n.platform/routes.yaml
Add domains, subdomains, and redirects
\n< Default Strapi Code >
\nSee the readme.md
in your project files for more info
\nExplore these files to create additional apps, services, and routes for your project.
"
+ copyCode:
+ - label: "Application code structure"
+ code:
+ - "├── .platform"
+ - "│ ├── routes.yaml"
+ - "│ └── services.yaml"
+ - "├── .platform.app.yaml"
+ - "└── < application code >"