diff --git a/.editorconfig b/.editorconfig
index 164f092d6..7bc7897c8 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -13,3 +13,7 @@ trim_trailing_whitespace = true
[Makefile]
indent_style = tab
+
+[*.yaml]
+indent_style = space
+indent_size = 2
diff --git a/dodo.py b/dodo.py
index d59ab97c0..a409475be 100644
--- a/dodo.py
+++ b/dodo.py
@@ -16,10 +16,10 @@
from project.gatsby import Gatsby
from project.hugo import Hugo
from project.laravel import Laravel
-from project.magento import Magento2ce
+# from project.magento import Magento2ce
from project.pimcore import Pimcore
from project.laravel import Laravel
-from project.magento import Magento2ce
+# from project.magento import Magento2ce
from project.mattermost import Mattermost
from project.mautic import Mautic
from project.nextjs import Nextjs
diff --git a/project/ReadmeMixin.py b/project/ReadmeMixin.py
new file mode 100644
index 000000000..b6637468d
--- /dev/null
+++ b/project/ReadmeMixin.py
@@ -0,0 +1,28 @@
+class ReadmeMixin:
+ readMeFileName = "README"
+ readMeFileExt = "md"
+ readMeUpstreamFile = "_UPSTREAM"
+ readMePSHFile = "_PSH"
+
+ def rename_psh_readme(self):
+ return 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "Moving {1}.{2} to {1}{3}.{2}"; mv "{1}.{2}" "{1}{3}.{2}";' \
+ 'fi;'.format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile)
+
+ def rename_psh_readme_back(self):
+ return 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" '\
+ '"{1}.{2}";fi;'.format(self.builddir,self.readMeFileName,self.readMeFileExt,self.readMePSHFile)
+
+ # return 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" '\
+ # '"{1}.{2}";git add {1}.{2};git commit -m "Committing our {1}.{2}";fi;'.format(self.builddir,
+ # self.readMeFileName,
+ # self.readMeFileExt,
+ # self.readMePSHFile)
+
+ def rename_upstream_readme(self):
+ return 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}{' \
+ '3}.{2}";fi;'.format(self.builddir,self.readMeFileName,self.readMeFileExt,self.readMeUpstreamFile)
+ # return 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}{' \
+ # '3}.{2}"; git add "{1}{3}.{2}";git commit -m "renamed {1} to {1}{3}";fi;'.format(self.builddir,
+ # self.readMeFileName,
+ # self.readMeFileExt,
+ # self.readMeUpstreamFile)
diff --git a/project/__init__.py b/project/__init__.py
index 9658daa47..baa328f65 100644
--- a/project/__init__.py
+++ b/project/__init__.py
@@ -114,7 +114,7 @@ def init(self):
name = self.github_name
else:
name = self.name.replace('_', '-')
- return ['git clone git@github.com:{2}/{0}.git {1}'.format(
+ return ['git clone --progress --verbose git@github.com:{2}/{0}.git {1}'.format(
name, self.builddir, self.template_org)
]
diff --git a/project/drupal.py b/project/drupal.py
index 192869370..02ff21e00 100644
--- a/project/drupal.py
+++ b/project/drupal.py
@@ -166,6 +166,10 @@ def update(self):
'cd {0} && composer remove php {1}'.format(self.builddir,
self.composer_defaults().replace('--prefer-dist', '')),
# 'cd {0} && rm -rf web/profiles/govcms'.format(self.builddir),
+ # for some reason, lcobucci/clock decided to bump the min php version to 8.2 between version 3.0.0 and 3.1.0
+ # https://github.com/lcobucci/clock/releases/tag/3.1.0
+ # @todo for now locking to 3.0.0 until we upgrade this project to php 8.2
+ 'cd {0} && composer require lcobucci/clock:3.0.0 {1}'.format(self.builddir, self.composer_defaults()),
]
@property
diff --git a/project/magento.py b/project/magento-archived.py
similarity index 88%
rename from project/magento.py
rename to project/magento-archived.py
index 89b2ad0da..c4656a3aa 100644
--- a/project/magento.py
+++ b/project/magento-archived.py
@@ -119,13 +119,13 @@ def magento_modify_composer(composer):
(self.modify_composer, [magento_modify_composer])
]
- @property
- def platformify(self):
- extraIgnores = '--ignore-platform-req=ext-iconv --ignore-platform-req=ext-soap ' \
- '--ignore-platform-req=ext-pdo_mysql '
-
- return super(Magento2ce, self).platformify + [
- 'cd {0} && composer require magento/ece-tools magento/magento-cloud-components '
- 'magento/quality-patches -W '.format(self.builddir) + self.composer_defaults() + extraIgnores,
- 'cd {0} && composer update -W {1}'.format(self.builddir, self.composer_defaults() + extraIgnores),
- ]
+ # @property
+ # def platformify(self):
+ # extraIgnores = '--ignore-platform-req=ext-iconv --ignore-platform-req=ext-soap ' \
+ # '--ignore-platform-req=ext-pdo_mysql '
+ #
+ # return super(Magento2ce, self).platformify + [
+ # 'cd {0} && composer require magento/ece-tools magento/magento-cloud-components '
+ # 'magento/quality-patches -W '.format(self.builddir) + self.composer_defaults() + extraIgnores,
+ # 'cd {0} && composer update -W {1}'.format(self.builddir, self.composer_defaults() + extraIgnores),
+ # ]
diff --git a/project/nuxtjs.py b/project/nuxtjs.py
index 982149520..ca59fd42b 100644
--- a/project/nuxtjs.py
+++ b/project/nuxtjs.py
@@ -1,9 +1,10 @@
from . import BaseProject
+from project.ReadmeMixin import ReadmeMixin
import json
import os
-class Nuxtjs(BaseProject):
+class Nuxtjs(BaseProject, ReadmeMixin):
# Keeps package-lock.json out of repo. See notes.md (Yarn - Overwriting updateCommands) for more details.
updateCommands = {
'package.json': 'yarn upgrade'
@@ -11,7 +12,6 @@ class Nuxtjs(BaseProject):
@property
def update(self):
-
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATEDIR = os.path.join(ROOTDIR, 'templates/nuxtjs')
@@ -25,6 +25,7 @@ def update(self):
"language": "js",
"pm": "yarn",
"ui": "none",
+ "template": "html",
"features": [],
"linter": [],
"test": "none",
@@ -39,22 +40,38 @@ def set_default(obj):
return list(obj)
raise TypeError
- return [
+ actions = [
+ #just in case a previous update failed, our temp directory may still be around
+ 'cd {0} && if [ -d "{1}" ]; then echo "removing previous {1} directory...";rm -rf {1};fi;'.format(TEMPLATEDIR,projectName),
+ super(Nuxtjs, self).rename_psh_readme(),
# Create a NuxtJS app using Yarn, since there's no dedicated upstream repo for it. Yarn prevents you
# from creating a new project in a nonempty dir, so the project is made in projectName before its
# contents are copied into builddir.
- 'cd {0} && npx create-nuxt-app --answers \"{1}\" {2}'.format(TEMPLATEDIR, json.dumps(createNuxtAppAnswers, default=set_default).replace('"', '\\"'), projectName),
+ # 'cd {0} && npx create-nuxt-app --answers \"{1}\" {2}'.format(TEMPLATEDIR,
+ # json.dumps(createNuxtAppAnswers,
+ # default=set_default).replace(
+ # '"', '\\"'), projectName),
+ 'cd {0} && npx nuxi@latest init {1}'.format(TEMPLATEDIR,projectName),
# Disable telemtery so we are not asked for it when running the application the first time
- 'cd {0}/{1} && npx nuxt telemetry disable'.format(TEMPLATEDIR, projectName),
+ #'cd {0}/{1} && npx nuxt telemetry disable'.format(TEMPLATEDIR, projectName),
'cd {0} && rm -rf {1}/.git'.format(TEMPLATEDIR, projectName),
'cd {0} && cp -r {1}/{2}/* .'.format(self.builddir, TEMPLATEDIR, projectName),
'cd {0} && rm -rf {1}'.format(TEMPLATEDIR, projectName),
- ] + super(Nuxtjs, self).update
+ 'echo "Going to delete the old readme_upstream..."',
+ 'cd {0} && if [ -f "README_upstream.md" ]; then echo "deleting previous README_upstream"; rm README_upstream.md;fi;'.format(
+ self.builddir),
+ 'echo "Going to rename the new README to README_UPSTREAM"',
+ super(Nuxtjs, self).rename_upstream_readme(),
+ super(Nuxtjs, self).rename_psh_readme_back(),
+ ]
+
+ actions.extend(self.package_update_actions())
+
+ return actions
@property
def platformify(self):
-
return super(Nuxtjs, self).platformify + [
# Add dependencies.
'cd {0} && yarn add platformsh-config'.format(self.builddir),
- ]
\ No newline at end of file
+ ]
diff --git a/project/remote.py b/project/remote.py
index 42ca2800b..17c997267 100644
--- a/project/remote.py
+++ b/project/remote.py
@@ -1,11 +1,10 @@
import subprocess
-
import packaging.version
-
from . import BaseProject
+from project.ReadmeMixin import ReadmeMixin
-class RemoteProject(BaseProject):
+class RemoteProject(BaseProject, ReadmeMixin):
"""
Base class for projects that need to synchronize code with an upstream source.
@@ -21,11 +20,6 @@ class RemoteProject(BaseProject):
from which to pull. (If both are defined, `major_version` take precedence.)
"""
- readMeFileName = "README"
- readMeFileExt = "md"
- readMeUpstreamFile = "_UPSTREAM"
- readMePSHFile = "_PSH"
-
@property
def init(self):
return super(RemoteProject, self).init + [
@@ -37,13 +31,14 @@ def init(self):
def update(self):
actions = [
# If we have a readme file from the template repository, rename it so we can bring it back later
- 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "Moving {1}.{2} to {1}{3}.{2}"; mv "{1}.{2}" "{1}{3}.{2}"; fi;'
- .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile),
+ # 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "Moving {1}.{2} to {1}{3}.{2}"; mv "{1}.{2}" "{1}{3}.{2}"; fi;'
+ # .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile),
+ super(RemoteProject, self).rename_psh_readme(),
'cd {0} && git checkout {1}'.format(self.builddir, self.default_branch),
'cd {0} && git fetch --all --depth=2'.format(self.builddir),
'cd {0} && git fetch --all --tags'.format(self.builddir),
# now we need to handle our .github directory and files
- 'cd {0} && [ -d {1} ] && mv {1} {2}'.format(self.builddir,'.github','tmp.github')
+ 'cd {0} && if [ -d {1} ]; then mv {1} {2};fi;'.format(self.builddir, '.github', 'tmp.github')
# Remove working directory files when updating from upstream, so that deletions get picked up.
# Disabled, because it was breaking Magento updates. Even though it was added to avoid breaking Magento updates.
# 'cd {0} && (find . -maxdepth 1 -not \( -path ./.git -o -path . \) -exec rm -rf {{}} \;)'.format(self.builddir),
@@ -68,16 +63,18 @@ def merge_from_upstream_tag():
# now we need to deal with the upstream README
actions.append(
- 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}'
- '{3}.{2}"; git add "{1}{3}.{2}";git commit -m "renamed {1} to {1}{3}";fi;'
- .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMeUpstreamFile)
+ super(RemoteProject, self).rename_upstream_readme()
+ # 'cd {0} && if [[ -f "{1}.{2}" ]]; then echo "moving upstream {1}.{2} to {1}{3}.{2}";mv "{1}.{2}" "{1}'
+ # '{3}.{2}"; git add "{1}{3}.{2}";git commit -m "renamed {1} to {1}{3}";fi;'
+ # .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMeUpstreamFile)
)
# and now our README
actions.append(
- 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" "'
- '{1}.{2}";git add {1}.{2};git commit -m "Commiting our {1}.{2}";fi;'
- .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile)
+ super(RemoteProject, self).rename_psh_readme_back()
+ # 'cd {0} && if [[ -f "{1}{3}.{2}" ]]; then echo "Moving our {1}{3}.{2} back to {1}.{2}";mv "{1}{3}.{2}" "'
+ # '{1}.{2}";git add {1}.{2};git commit -m "Commiting our {1}.{2}";fi;'
+ # .format(self.builddir, self.readMeFileName, self.readMeFileExt, self.readMePSHFile)
)
# now if a .github directory was reintroduced from the upstream, delete it, and then if ours is present, rename
@@ -85,7 +82,8 @@ def merge_from_upstream_tag():
actions.append(
# remove a .github directory that might have been brought in from upstream
# @todo should we loop through all possible directories/files that may need to be removed?
- 'cd {0}; if [ -d {1} ]; then rm -rf {1};fi; if [ -d {2} ]; then mv {2} {1};fi;'.format(self.builddir, '.github', 'tmp'
+ 'cd {0}; if [ -d {1} ]; then rm -rf {1};fi; if [ -d {2} ]; then mv {2} {1};fi;'.format(self.builddir,
+ '.github', 'tmp'
'.github')
)
# Do this last so it picks up all changes from above.
diff --git a/project/wordpress.py b/project/wordpress.py
index 7c7b3b6d3..c8c5b67b3 100644
--- a/project/wordpress.py
+++ b/project/wordpress.py
@@ -20,7 +20,9 @@ def platformify(self):
# Release the tar and cleanup.
'cd {0} && tar -xvf {1}.tar.gz && rm {1}.tar.gz'.format(self.builddir, self.install_dir),
# Move Platform.sh files into `wordpress`.
- 'cd {0} && mv wp-config.php {1} && mv wp-cli.yml {1}'.format(self.builddir, self.install_dir),
+ # No longer needed as our wp-config and wp-cli.yml files are already in the wordpress directory from the
+ # template repository
+ # 'cd {0} && mv wp-config.php {1} && mv wp-cli.yml {1}'.format(self.builddir, self.install_dir),
]
diff --git a/templates/beego/files/.gitignore b/templates/beego/files/.gitignore
deleted file mode 100644
index 154839d39..000000000
--- a/templates/beego/files/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/.GOPATH
-/bin
diff --git a/templates/beego/files/.platform.app.yaml b/templates/beego/files/.platform.app.yaml
index 0b84c88df..d268da3b5 100644
--- a/templates/beego/files/.platform.app.yaml
+++ b/templates/beego/files/.platform.app.yaml
@@ -1,47 +1,77 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: golang:1.16
-# The hooks executed at various points in the lifecycle of the application.
-hooks:
- build: |
- # Modify this line if you want to build differently or use an alternate name for your executable.
- go build -o bin/app
-
+# 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"
+ database: "db:mysql"
-# The configuration of app when it is exposed to the web.
-web:
- upstream:
- socket_family: tcp
- protocol: http
-
- commands:
- # If you change the build output in the build hook above, update this line as well.
- start: ./bin/app
-
- locations:
- /:
- # Route all requests to the Go app, unconditionally.
- # If you want some files served directly by the web server without hitting Go, see
- # https://docs.platform.sh/configuration/app/web.html
- allow: false
- passthru: true
-
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 1024
+# 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:
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ socket_family: tcp
+ protocol: http
+
+ # 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.
+ # If you change the build output in the build hook update this line as well.
+ start: ./bin/app
+
+ # 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:
+ /:
+ # Whether to allow serving files which don’t match a rule.
+ # Route all requests to the Go app, unconditionally.
+ # If you want some files served directly by the web server without hitting Go, see
+ # https://docs.platform.sh/configuration/app/web.html
+ allow: false
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ # Modify this line if you want to build differently or use an alternate name for your executable.
+ go build -o bin/app
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
-
+
diff --git a/templates/beego/files/.platform/routes.yaml b/templates/beego/files/.platform/routes.yaml
index 75184f30d..5a6dfc2f3 100644
--- a/templates/beego/files/.platform/routes.yaml
+++ b/templates/beego/files/.platform/routes.yaml
@@ -1,13 +1,14 @@
-
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
-
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
- type: upstream
- upstream: "app:http"
+ type: upstream
+ upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
- type: redirect
- to: "https://{default}/"
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/beego/files/.platform/services.yaml b/templates/beego/files/.platform/services.yaml
index 4cf9889d9..243845955 100644
--- a/templates/beego/files/.platform/services.yaml
+++ b/templates/beego/files/.platform/services.yaml
@@ -2,7 +2,8 @@
#
# Each service listed will be deployed
# to power your Platform.sh project.
-
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
- type: mariadb:10.4
- disk: 1024
+ type: mariadb:10.4
+ disk: 1024
diff --git a/templates/beego/files/README.md b/templates/beego/files/README.md
deleted file mode 100644
index 8eaac9243..000000000
--- a/templates/beego/files/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Beego for Platform.sh
-
-
-
-
-
-
-
-
diff --git a/templates/directus/files/.environment b/templates/directus/files/.environment
deleted file mode 100644
index a45a4f364..000000000
--- a/templates/directus/files/.environment
+++ /dev/null
@@ -1,131 +0,0 @@
-####################################################################################################
-# General
-
-# Public url for the current Platform.sh environment. Remove trailing slash.
-ENVIRONMENT=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.primary == true) | .key')
-export PUBLIC_URL=${ENVIRONMENT%/}
-export LOG_STYLE="pretty"
-if [ "$PLATFORM_BRANCH" != "master" ] ; then
- export LOG_LEVEL="silent"
-else
- export LOG_LEVEL="silent"
-fi
-
-####################################################################################################
-# Database
-
-export DB_CLIENT="pg"
-export DB_HOST=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].host")
-export DB_PORT=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].port")
-export DB_DATABASE=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].path")
-export DB_USER=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].username")
-export DB_PASSWORD=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].password")
-
-####################################################################################################
-# Rate Limiting
-
-export RATE_LIMITER_ENABLED=true
-
-export RATE_LIMITER_POINTS=50
-export RATE_LIMITER_DURATION=1
-
-export RATE_LIMITER_STORE=redis
-
-export RATE_LIMITER_REDIS_HOST=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".redisratelimit[0].host")
-export RATE_LIMITER_REDIS_PORT=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".redisratelimit[0].port")
-export RATE_LIMITER_REDIS_PASSWORD=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".redisratelimit[0].password")
-export RATE_LIMITER_REDIS_DB=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".redisratelimit[0].path")
-
-####################################################################################################
-# Caching
-
-export CACHE_ENABLED=true
-export CACHE_TTL="30m"
-export CACHE_NAMESPACE="directus-cache"
-export CACHE_STORE=redis
-export CACHE_AUTO_PURGE=true
-
-export ASSETS_CACHE_TTL="30m"
-
-export CACHE_REDIS_HOST=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].host")
-export CACHE_REDIS_PORT=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].port")
-export CACHE_REDIS_PASSWORD=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].password")
-export CACHE_REDIS_DB=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].path")
-
-####################################################################################################
-# File Storage
-
-export STORAGE_LOCATIONS="local" # CSV of names
-
-export STORAGE_LOCAL_PUBLIC_URL="${PUBLIC_URL}/uploads"
-export STORAGE_LOCAL_DRIVER="local"
-export STORAGE_LOCAL_ROOT="./uploads"
-
-## S3 Example (location name: DigitalOcean)
-# STORAGE_DIGITALOCEAN_DRIVER="s3"
-# STORAGE_DIGITALOCEAN_PUBLIC_URL="https://cdn.example.com/"
-# STORAGE_DIGITALOCEAN_KEY="abcdef"
-# STORAGE_DIGITALOCEAN_SECRET="ghijkl"
-# STORAGE_DIGITALOCEAN_ENDPOINT="ams3.digitaloceanspaces.com"
-# STORAGE_DIGITALOCEAN_BUCKET="my-files"
-# STORAGE_DIGITALOCEAN_REGION="ams3"
-
-## Google Cloud Storage Example (location name: Google)
-# STORAGE_GOOGLE_DRIVER="gcs"
-# STORAGE_GOOGLE_PUBLIC_URL="https://cdn.example.com/"
-# STORAGE_GOOGLE_KEY_FILENAME="abcdef"
-# STORAGE_GOOGLE_BUCKET="my-files"
-
-####################################################################################################
-# Security
-
-# Using project entropy for Directus secret keys.
-export KEY=$PLATFORM_PROJECT_ENTROPY
-export SECRET=$PLATFORM_PROJECT_ENTROPY
-export ACCESS_TOKEN_TTL="15m"
-export REFRESH_TOKEN_TTL="7d"
-export REFRESH_TOKEN_COOKIE_SECURE="false"
-export REFRESH_TOKEN_COOKIE_SAME_SITE="lax"
-
-export CORS_ENABLED="true"
-export CORS_ORIGIN=*
-export CORS_METHODS=GET,POST,PATCH,DELETE
-export CORS_ALLOWED_HEADERS=Content-Type,Authorization
-export CORS_EXPOSED_HEADERS=Content-Range
-export CORS_CREDENTIALS="true"
-export CORS_MAX_AGE=18000
-
-####################################################################################################
-# SSO (OAuth) Providers
-
-# OAUTH_PROVIDERS="github, facebook"
-
-# OAUTH_GITHUB_KEY="abcdef"
-# OAUTH_GITHUB_SECRET="ghijkl"
-
-# OAUTH_FACEBOOK_KEY="abcdef"
-# OAUTH_FACEBOOK_SECRET="ghijkl"
-
-####################################################################################################
-# Extensions
-
-export EXTENSIONS_PATH="./extensions"
-
-####################################################################################################
-# Email
-
-export EMAIL_FROM=no-reply@directus.io
-export EMAIL_TRANSPORT=smtp
-
-## Email (SMTP Transport)
-export EMAIL_SMTP_HOST=$PLATFORM_SMTP_HOST
-export EMAIL_SMTP_PORT=25
-
-####################################################################################################
-# Platform.sh
-
-export PROJECT_NAME='Directus on Platform.sh'
-
-# Initial admin user on first deploy.
-export INIT_ADMINUSER='admin@example.com'
-export INIT_ADMINPW='password'
diff --git a/templates/directus/files/.gitignore b/templates/directus/files/.gitignore
deleted file mode 100644
index 37d7e7348..000000000
--- a/templates/directus/files/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules
-.env
diff --git a/templates/directus/files/.platform.app.yaml b/templates/directus/files/.platform.app.yaml
index 4f9a75e3f..02f9b5b73 100644
--- a/templates/directus/files/.platform.app.yaml
+++ b/templates/directus/files/.platform.app.yaml
@@ -1,87 +1,123 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/configuration/app.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
-name: app
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
+name: directus
# The runtime the application uses.
-type: nodejs:12
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: nodejs:18
# 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: "dbpostgres:postgresql"
- rediscache: "cacheredis:redis"
- redisratelimit: "ratelimitredis:redis"
-
-# The hooks that will be triggered when the package is deployed.
-hooks:
- build: |
- set -e
- # Copy committed extensions and uploads to tmp directories so not overwritten by mount.
- if [ -d extensions ]; then
- mkdir extensions-tmp && mv extensions/* extensions-tmp
- fi
- if [ -d uploads ]; then
- mkdir uploads-tmp && mv uploads/* uploads-tmp
- fi
- deploy: |
- set -e
- # Installs the database and sets up the initial admin user. Only run on first deploy.
- if [ ! -f var/platformsh.installed ]; then
- # Install the database
- echo 'Installing the database...'
- npx directus database install
-
- # Create the admin user role
- echo 'Setting up the initial admin role...'
- ROLE_UUID=$(npx directus roles create --name admin --admin)
-
- # Pipe output of above command into this one, adding an initial admin user
- echo 'Creating the initial admin user...'
- npx directus users create --email $INIT_ADMINUSER --password $INIT_ADMINPW --role $ROLE_UUID
-
- # Create file that indicates first deploy and installation has been completed.
- touch var/platformsh.installed
- fi;
- # Copy committed extensions and uploads back onto writable mounts.
- if [ -d extensions-tmp ]
- then
- cp -r extensions-tmp/* extensions
- fi
- if [ -d uploads-tmp ]
- then
- cp -r uploads-tmp/* uploads
- fi
-
-# Start the Directus server.
-web:
- commands:
- start: npx directus start
+ database: "db:postgresql"
+ rediscache: "cacheredis:redis"
+ redisratelimit: "ratelimitredis:redis"
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 1024
-# Platform.sh write access at runtime.
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
- 'extensions':
- source: local
- source_path: extensions
- 'uploads':
- source: local
- source_path: uploads
- 'var':
- source: local
- source_path: var
+ # Directory to track first deploy.
+ 'var':
+ source: local
+ source_path: var
+ # Allow for file uploads.
+ 'uploads':
+ source: local
+ source_path: uploads
+
+# 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.
+ start: npx directus start
+
+#
+timezone: "America/New_York"
+
+# Variables to control the environment. More information: https://docs.platform.sh/create-apps/app-reference.html#variables
+variables:
+ env:
+ UPDATE_ENVIRONMENT: update
+ TEMPLATE_PROFILE: directus
+
+# 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:
+ python3:
+ pipenv: '*'
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -e
+ # Rebuild argon2 to fix upstream issue (See https://docs.directus.io/guides/installation/plesk/#bootstrap-directus).
+ npm run argon2-rebuild
+
+ # Template maintenance tasks.
+ .platform-scripts/template/update_tools.sh
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: |
+ set -e
+ # Installs the database and sets up the initial admin user. Only run on first deploy.
+ if [ ! -f var/platformsh.installed ]; then
+ echo 'Bootstrapping Directus on first deploy...'
+
+ export PROJECT_NAME='Directus on Platform.sh'
+ export ADMIN_EMAIL='admin@example.com'
+ export ADMIN_PASSWORD='password'
+
+ npx directus bootstrap
+
+ # Create file that indicates first deploy and installation has been completed.
+ touch var/platformsh.installed
+ else
+ # Update the database in case directus updated in the most recent push
+ npx directus database migrate:latest
+ fi;
+
+# Scheduled tasks for the app.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#crons
+crons:
+ # Auto-update environment verification.
+ verify_envs:
+ spec: '45 2 * * *' # Create environment just before update.
+ cmd: .platform-scripts/template/crons.verify_envs.sh
+ # Auto-update cron job.
+ update:
+ spec: '0 3 * * *' # Update template.
+ cmd: .platform-scripts/template/crons.update.sh
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
-
diff --git a/templates/directus/files/.platform/routes.yaml b/templates/directus/files/.platform/routes.yaml
index 12f1d80f1..7d7a7bc9e 100644
--- a/templates/directus/files/.platform/routes.yaml
+++ b/templates/directus/files/.platform/routes.yaml
@@ -2,11 +2,22 @@
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
+# More information: https://docs.platform.sh/define-routes.html
+"https://{default}/":
+ type: upstream
+ upstream: "directus:http"
+ # Platform.sh supports HTTP caching at the server level. Caching is enabled by default, but is only applied to
+ # GET and HEAD requests.
+ # More information: https://docs.platform.sh/define-routes/cache.html
+ cache:
+ # All possible cache configuration options: https://docs.platform.sh/define-routes/cache.html#cache-configuration-properties
+ enabled: true
+ default_ttl: 0
+ cookies: [ '*' ]
+ headers: [ 'Accept', 'Accept-Language' ]
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
- type: upstream
- upstream: "app:http"
-
-"https://{default}/":
- type: redirect
- to: "https://www.{default}/"
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/directus/files/.platform/services.yaml b/templates/directus/files/.platform/services.yaml
index 63ea83700..0d25252f6 100644
--- a/templates/directus/files/.platform/services.yaml
+++ b/templates/directus/files/.platform/services.yaml
@@ -2,13 +2,19 @@
#
# Each service listed will be deployed
# to power your Platform.sh project.
-
-dbpostgres:
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
+db:
type: postgresql:12
disk: 256
-
+# Alternative database options
+# MySQL/MariaDB database service.
+# db:
+# type: mariadb:10.5
+# disk: 256
+# Redis caching service.
cacheredis:
type: redis:6.0
-
+# Redis rate-limiting service.
ratelimitredis:
type: redis:6.0
diff --git a/templates/directus/files/README.md b/templates/directus/files/README.md
deleted file mode 100644
index b220511f5..000000000
--- a/templates/directus/files/README.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# Directus for Platform.sh
-
-
-
-This template demonstrates building Directus for Platform.sh. It includes a quickstart application configured to run with PostgreSQL. It is intended for you to use as a starting point and modify for your own needs.
-
-Directus is an open-source platform that allows you to create and manage an API from data stored in a database.
-
-## Features
-
-* Node.js 12
-* PostgreSQL 12
-* Redis 6.0
-* Automatic TLS certificates
-* npm-based build
-
-## Post-install
-
-### Admin user
-
-This template does not require any additional configuration once deployed to start developing your Directus application. During the first deploy, however, an admin user was added to allow you to log in. Those credentials are set (along with many other Platform.sh-specific settings) in the `.environment` file:
-
-```txt
-# Initial admin user on first deploy.
-export INIT_ADMINUSER='admin@example.com'
-export INIT_ADMINPW='password'
-```
-
-After you log in for the first time, be sure to update this password immediately.
-
-### Database
-
-Although this project uses PostgreSQL as its primary database, Directus supports [a number of other options](https://docs.directus.io/guides/installation/cli.html#_1-confirm-minimum-requirements-are-met) that can be easily substituted using Platform.sh's managed services.
-
-- [MariaDB](https://docs.platform.sh/configuration/services/mysql.html)
-- [Oracle MySQL](https://docs.platform.sh/configuration/services/mysql.html)
-- [PostgreSQL](https://docs.platform.sh/configuration/services/postgresql.html)
-
-### Logging
-
-The Directus CLI is used to create both a role UUID for admin users, and to use that UUID to create the initial admin user. Currently, having a `LOG_LEVEL` for Directus other than `silent` causes the log message to be included in the following line from the `.platform.app.yaml` file's deploy hook, resulting in a syntax error when creating that first user:
-
-```yaml
-ROLE_UUID=$(npx directus roles create --name admin --admin)
-```
-
-This is only something to be aware of on the first install, or when using a similar method for creating new users using the CLI. After you have deployed Directus and created the first admin user, you will likely want to update the `.environment` file to set more reasonable environment-dependent log messages:
-
-```txt
-if [ "$PLATFORM_BRANCH" != "master" ] ; then
- export LOG_LEVEL="debug"
-else
- export LOG_LEVEL="info"
-fi
-```
-
-## Customizations
-
-The following files and additions make the framework work on Platform.sh on top of the basic quickstart project (`npx create-directus-project`). If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* The `.environment` file provides Platform.sh-specific environment variable overrides from the generated default `.env` settings for Directus and PostgreSQL. It also sets an initial username and password for an admin user. On Platform.sh, a `.env` file is required to configure Directus but is not committed (see below) in this project. Rather, at build time Directus's `example.env` file (`node_modules/directus/example.env`) is renamed in its place with a set of standard defaults which are then overridden by `.environment`. Consult this file locally, and then override with your own settings in `.environment` when appropriate.
-* A `.gitignore` file has been added to prevent `node_modules` and your `.env` generated for local development from being committed.
-
-## Local development
-
-1. Add the database
-
- With this configuration, you will need to manually add Directus's database before running locally. For Postgresql:
-
- ```txt
- $ psql
- psql (12.4)
- Type "help" for help.
-
- me=# create database directus;
- CREATE DATABASE
- ```
-
-2. Set up your database
-
- Run the commands below, and then follow the CLI prompts provided to configure Directus on your local database installation:
-
- ```bash
- $ npm install
- $ npx directus init
- ```
-
-3. Run the server
-
- Run the Directus server locally with the command `npx directus start`.
-
-## References
-
-* [Directus Documentation](https://docs.directus.io/getting-started/introduction.html)
-* [Node.js on Platform.sh](https://docs.platform.sh/languages/nodejs.html)
diff --git a/templates/directus/files/package.json b/templates/directus/files/package.json
deleted file mode 100644
index b06eb0b7f..000000000
--- a/templates/directus/files/package.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "platformsh-directus",
- "version": "1.0.0",
- "description": "",
- "main": "index.js",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "keywords": [],
- "author": "",
- "license": "MIT",
- "dependencies": {
- "directus": "^9.0.0-rc.31",
- "pg": "^8.5.1"
- }
-}
diff --git a/templates/django3/files/.gitignore b/templates/django3/files/.gitignore
deleted file mode 100644
index 8796b0f7e..000000000
--- a/templates/django3/files/.gitignore
+++ /dev/null
@@ -1,114 +0,0 @@
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-wheels/
-share/python-wheels/
-*.egg-info/
-.installed.cfg
-*.egg
-MANIFEST
-
-# PyInstaller
-# Usually these files are written by a python script from a template
-# before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.nox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*.cover
-.hypothesis/
-.pytest_cache/
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-local_settings.py
-db.sqlite3
-
-# Scrapy stuff:
-.scrapy
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# IPython
-profile_default/
-ipython_config.py
-
-# pyenv
-.python-version
-
-# celery beat schedule file
-celerybeat-schedule
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
-.env
-.venv
-env/
-venv/
-ENV/
-env.bak/
-venv.bak/
-
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
-.dmypy.json
-dmypy.json
-
-# Pyre type checker
-.pyre/
-
-# Ignore mounts
-logs
diff --git a/templates/django3/files/.platform.app.yaml b/templates/django3/files/.platform.app.yaml
index da8727104..dbcdbb9ee 100644
--- a/templates/django3/files/.platform.app.yaml
+++ b/templates/django3/files/.platform.app.yaml
@@ -1,69 +1,98 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: 'app'
# The runtime the application uses.
-type: 'python:3.8'
-
-# The build-time dependencies of the app.
-dependencies:
- python3:
- pipenv: '2018.10.13'
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: 'python:3.10'
# 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:postgresql"
+ database: "db:postgresql"
-# The configuration of app when it is exposed to the web.
-web:
- # Whether your app should speak to the webserver via TCP or Unix socket
- # https://docs.platform.sh/configuration/app-containers.html#upstream
- upstream:
- socket_family: unix
- # Commands are run once after deployment to start the application process.
- commands:
- start: "gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
- locations:
- "/":
- passthru: true
- "/static":
- root: "static"
- expires: 1h
- allow: true
-
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 512
-# Set a local R/W mount for logs
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
- 'logs':
- source: local
- source_path: logs
+ 'logs':
+ source: local
+ source_path: logs
+
+# 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.
+ start: "pipenv run gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
+
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ 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:
+ "/":
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+ "/static":
+ # The directory to serve static assets for this location relative to the app’s root directory. Must be an
+ # actual directory inside the root directory.
+ root: "static"
+ # The number of seconds whitelisted (static) content should be cached.
+ expires: 1h
+ # Whether to allow serving files which don’t match a rule.
+ allow: true
+
+# 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:
+ python3:
+ pipenv: '2023.7.23'
-# The hooks executed at various points in the lifecycle of the application.
+# 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 before the application is deployed, and is useful for
- # assembling the codebase.
+ # The build hook is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
build: |
- pipenv install --system --deploy
+ pipenv install --deploy
mkdir logs
- python manage.py collectstatic
+ pipenv run python manage.py collectstatic
rm -rf logs
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
deploy: |
- python manage.py migrate
+ pipenv run python manage.py migrate
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
-
diff --git a/templates/django3/files/.platform/routes.yaml b/templates/django3/files/.platform/routes.yaml
index ff74ad9b6..5a6dfc2f3 100644
--- a/templates/django3/files/.platform/routes.yaml
+++ b/templates/django3/files/.platform/routes.yaml
@@ -1,13 +1,14 @@
# The routes of the project.
#
-# Each route describes how an incoming URL is going to be processed by Platform.sh.
-#
-# See https://docs.platform.sh/user_guide/reference/routes-yaml.html
-
+# Each route describes how an incoming URL is going
+# to be processed by Platform.sh.
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
- type: upstream
- upstream: "app:http"
+ type: upstream
+ upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
- type: redirect
- to: "https://{default}/"
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/django3/files/.platform/services.yaml b/templates/django3/files/.platform/services.yaml
index 6f1ee67f5..c21d02f93 100644
--- a/templates/django3/files/.platform/services.yaml
+++ b/templates/django3/files/.platform/services.yaml
@@ -1,10 +1,9 @@
# The services of the project.
#
-# Each service listed will be deployed in its own container as part of your
-# Platform.sh project.
-#
-# See https://docs.platform.sh/user_guide/reference/services-yaml.html
-
+# Each service listed will be deployed
+# to power your Platform.sh project.
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
- type: postgresql:12
- disk: 1024
+ type: postgresql:12
+ disk: 1024
diff --git a/templates/django3/files/Pipfile b/templates/django3/files/Pipfile
deleted file mode 100644
index 4558b45e8..000000000
--- a/templates/django3/files/Pipfile
+++ /dev/null
@@ -1,15 +0,0 @@
-[[source]]
-verify_ssl = true
-url = "https://pypi.org/simple"
-name = "pypi"
-
-[packages]
-django = ">=3.1.6,<4.0"
-"psycopg2-binary" = "*"
-gunicorn = "*"
-platformshconfig = "~=2.0"
-
-[requires]
-python_version = "3.8"
-
-[dev-packages]
diff --git a/templates/django3/files/Pipfile.lock b/templates/django3/files/Pipfile.lock
deleted file mode 100644
index 2fa7b3292..000000000
--- a/templates/django3/files/Pipfile.lock
+++ /dev/null
@@ -1,118 +0,0 @@
-{
- "_meta": {
- "hash": {
- "sha256": "9fd56905235ed1a5d38acd33510acc569cde9746e9804b931f04c00b8df23872"
- },
- "pipfile-spec": 6,
- "requires": {
- "python_version": "3.8"
- },
- "sources": [
- {
- "name": "pypi",
- "url": "https://pypi.org/simple",
- "verify_ssl": true
- }
- ]
- },
- "default": {
- "asgiref": {
- "hashes": [
- "sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4",
- "sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424"
- ],
- "markers": "python_version >= '3.7'",
- "version": "==3.5.2"
- },
- "django": {
- "hashes": [
- "sha256:677182ba8b5b285a4e072f3ac17ceee6aff1b5ce77fd173cc5b6a2d3dc022fcf",
- "sha256:a8681e098fa60f7c33a4b628d6fcd3fe983a0939ff1301ecacac21d0b38bad56"
- ],
- "index": "pypi",
- "version": "==3.2.14"
- },
- "gunicorn": {
- "hashes": [
- "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e",
- "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"
- ],
- "index": "pypi",
- "version": "==20.1.0"
- },
- "platformshconfig": {
- "hashes": [
- "sha256:3eb95a514de57ce3341690fd3e0a61e6fa8c858a0793810a29fcce40691254a2",
- "sha256:ff1e29719d2789f6d164e1abd42dbecec1c535e5e741161ba177cec34bfdd6de"
- ],
- "index": "pypi",
- "version": "==2.4.0"
- },
- "psycopg2-binary": {
- "hashes": [
- "sha256:0b7dae87f0b729922e06f85f667de7bf16455d411971b2043bbd9577af9d1975",
- "sha256:0f2e04bd2a2ab54fa44ee67fe2d002bb90cee1c0f1cc0ebc3148af7b02034cbd",
- "sha256:123c3fb684e9abfc47218d3784c7b4c47c8587951ea4dd5bc38b6636ac57f616",
- "sha256:1473c0215b0613dd938db54a653f68251a45a78b05f6fc21af4326f40e8360a2",
- "sha256:14db1752acdd2187d99cb2ca0a1a6dfe57fc65c3281e0f20e597aac8d2a5bd90",
- "sha256:1e3a362790edc0a365385b1ac4cc0acc429a0c0d662d829a50b6ce743ae61b5a",
- "sha256:1e85b74cbbb3056e3656f1cc4781294df03383127a8114cbc6531e8b8367bf1e",
- "sha256:1f6ca4a9068f5c5c57e744b4baa79f40e83e3746875cac3c45467b16326bab45",
- "sha256:20f1ab44d8c352074e2d7ca67dc00843067788791be373e67a0911998787ce7d",
- "sha256:24b0b6688b9f31a911f2361fe818492650795c9e5d3a1bc647acbd7440142a4f",
- "sha256:2f62c207d1740b0bde5c4e949f857b044818f734a3d57f1d0d0edc65050532ed",
- "sha256:3242b9619de955ab44581a03a64bdd7d5e470cc4183e8fcadd85ab9d3756ce7a",
- "sha256:35c4310f8febe41f442d3c65066ca93cccefd75013df3d8c736c5b93ec288140",
- "sha256:4235f9d5ddcab0b8dbd723dca56ea2922b485ea00e1dafacf33b0c7e840b3d32",
- "sha256:542875f62bc56e91c6eac05a0deadeae20e1730be4c6334d8f04c944fcd99759",
- "sha256:5ced67f1e34e1a450cdb48eb53ca73b60aa0af21c46b9b35ac3e581cf9f00e31",
- "sha256:661509f51531ec125e52357a489ea3806640d0ca37d9dada461ffc69ee1e7b6e",
- "sha256:7360647ea04db2e7dff1648d1da825c8cf68dc5fbd80b8fb5b3ee9f068dcd21a",
- "sha256:736b8797b58febabb85494142c627bd182b50d2a7ec65322983e71065ad3034c",
- "sha256:8c13d72ed6af7fd2c8acbd95661cf9477f94e381fce0792c04981a8283b52917",
- "sha256:988b47ac70d204aed01589ed342303da7c4d84b56c2f4c4b8b00deda123372bf",
- "sha256:995fc41ebda5a7a663a254a1dcac52638c3e847f48307b5416ee373da15075d7",
- "sha256:a36c7eb6152ba5467fb264d73844877be8b0847874d4822b7cf2d3c0cb8cdcb0",
- "sha256:aed4a9a7e3221b3e252c39d0bf794c438dc5453bc2963e8befe9d4cd324dff72",
- "sha256:aef9aee84ec78af51107181d02fe8773b100b01c5dfde351184ad9223eab3698",
- "sha256:b0221ca5a9837e040ebf61f48899926b5783668b7807419e4adae8175a31f773",
- "sha256:b4d7679a08fea64573c969f6994a2631908bb2c0e69a7235648642f3d2e39a68",
- "sha256:c250a7ec489b652c892e4f0a5d122cc14c3780f9f643e1a326754aedf82d9a76",
- "sha256:ca86db5b561b894f9e5f115d6a159fff2a2570a652e07889d8a383b5fae66eb4",
- "sha256:cfc523edecddaef56f6740d7de1ce24a2fdf94fd5e704091856a201872e37f9f",
- "sha256:d92272c7c16e105788efe2cfa5d680f07e34e0c29b03c1908f8636f55d5f915a",
- "sha256:da113b70f6ec40e7d81b43d1b139b9db6a05727ab8be1ee559f3a69854a69d34",
- "sha256:ebccf1123e7ef66efc615a68295bf6fdba875a75d5bba10a05073202598085fc",
- "sha256:f6fac64a38f6768e7bc7b035b9e10d8a538a9fadce06b983fb3e6fa55ac5f5ce",
- "sha256:f8559617b1fcf59a9aedba2c9838b5b6aa211ffedecabca412b92a1ff75aac1a",
- "sha256:fbb42a541b1093385a2d8c7eec94d26d30437d0e77c1d25dae1dcc46741a385e"
- ],
- "index": "pypi",
- "version": "==2.9.1"
- },
- "pytz": {
- "hashes": [
- "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7",
- "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"
- ],
- "version": "==2022.1"
- },
- "setuptools": {
- "hashes": [
- "sha256:16923d366ced322712c71ccb97164d07472abeecd13f3a6c283f6d5d26722793",
- "sha256:db3b8e2f922b2a910a29804776c643ea609badb6a32c4bcc226fd4fd902cce65"
- ],
- "markers": "python_version >= '3.7'",
- "version": "==63.1.0"
- },
- "sqlparse": {
- "hashes": [
- "sha256:0c00730c74263a94e5a9919ade150dfc3b19c574389985446148402998287dae",
- "sha256:48719e356bb8b42991bdbb1e8b83223757b93789c00910a616a071910ca4a64d"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==0.4.2"
- }
- },
- "develop": {}
-}
diff --git a/templates/django3/files/README.md b/templates/django3/files/README.md
deleted file mode 100644
index 6965a5737..000000000
--- a/templates/django3/files/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Django 3 for Platform.sh
-
-
-
-This template deploys the Django 3 application framework on Platform.sh, using the gunicorn application runner. It also includes a PostgreSQL database connection pre-configured.
-
-Django is a Python-based web application framework with a built-in ORM.
-
-## Features
-
-* Python 3.8
-* PostgreSQL 12
-* Automatic TLS certificates
-* Pipfile-based build
-
-## Customizations
-
-The following files have been added to a basic Django configuration. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* An additional Pip library, [`platformshconfig`](https://github.com/platformsh/config-reader-python), has been added. It provides convenience wrappers for accessing the Platform.sh environment variables.
-* A rudimentary `myapp` application is included for demonstration purposes. In particular, the `settings.py` file is set up to configure Django to connect to the correct database, and run in Debug mode when not running the `master` branch. You are free to change that configuration if you prefer.
-
-## References
-
-* [Django](https://www.djangoproject.com/)
-* [Python on Platform.sh](https://docs.platform.sh/languages/python.html)
diff --git a/templates/django3/files/hello/__init__.py b/templates/django3/files/hello/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/django3/files/hello/admin.py b/templates/django3/files/hello/admin.py
deleted file mode 100644
index 8c38f3f3d..000000000
--- a/templates/django3/files/hello/admin.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.contrib import admin
-
-# Register your models here.
diff --git a/templates/django3/files/hello/apps.py b/templates/django3/files/hello/apps.py
deleted file mode 100644
index 73434282c..000000000
--- a/templates/django3/files/hello/apps.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from django.apps import AppConfig
-
-
-class HelloConfig(AppConfig):
- name = 'hello'
diff --git a/templates/django3/files/hello/migrations/__init__.py b/templates/django3/files/hello/migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/django3/files/hello/models.py b/templates/django3/files/hello/models.py
deleted file mode 100644
index 71a836239..000000000
--- a/templates/django3/files/hello/models.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.db import models
-
-# Create your models here.
diff --git a/templates/django3/files/hello/templates/base.html b/templates/django3/files/hello/templates/base.html
deleted file mode 100644
index 488153230..000000000
--- a/templates/django3/files/hello/templates/base.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{% load i18n static %}
-{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
-
-
-{% block title %}{% endblock %}
-{% block extrastyle %}{% endblock %}
-{% if LANGUAGE_BIDI %}{% endif %}
-{% block extrahead %}{% endblock %}
-
-
-
-
-
-{% block blockbots %}{% endblock %}
-
-{% load i18n %}
-
-
-
-
-
-
-
Example
-
-
-
-
-
-
{{ message }}
-
Continuous Deployment Cloud Hosting
- Blazing fast hosting. No more failed deployments. No more downtime. Improved web development productivity.
-
-
-
diff --git a/templates/django3/files/hello/tests.py b/templates/django3/files/hello/tests.py
deleted file mode 100644
index 7ce503c2d..000000000
--- a/templates/django3/files/hello/tests.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/templates/django3/files/hello/urls.py b/templates/django3/files/hello/urls.py
deleted file mode 100644
index 88a9caca8..000000000
--- a/templates/django3/files/hello/urls.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from django.urls import path
-
-from . import views
-
-urlpatterns = [
- path('', views.index, name='index'),
-]
diff --git a/templates/django3/files/hello/views.py b/templates/django3/files/hello/views.py
deleted file mode 100644
index 1ab7e7994..000000000
--- a/templates/django3/files/hello/views.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from django.http import HttpResponse
-from django.template import loader
-
-
-def index(request):
- template = loader.get_template('base.html')
- context = {
- 'message': "Hello, and welcome to the Platform.sh world",
- }
- return HttpResponse(template.render(context, request))
diff --git a/templates/django3/files/manage.py b/templates/django3/files/manage.py
deleted file mode 100644
index ed184bffe..000000000
--- a/templates/django3/files/manage.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-import os
-import sys
-
-if __name__ == '__main__':
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
- try:
- from django.core.management import execute_from_command_line
- except ImportError as exc:
- raise ImportError(
- "Couldn't import Django. Are you sure it's installed and "
- "available on your PYTHONPATH environment variable? Did you "
- "forget to activate a virtual environment?"
- ) from exc
- execute_from_command_line(sys.argv)
diff --git a/templates/django3/files/myapp/__init__.py b/templates/django3/files/myapp/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/django3/files/myapp/settings.py b/templates/django3/files/myapp/settings.py
deleted file mode 100644
index 9fd148829..000000000
--- a/templates/django3/files/myapp/settings.py
+++ /dev/null
@@ -1,151 +0,0 @@
-"""
-Django settings for myapp project.
-
-Generated by 'django-admin startproject' using Django 3.1.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/3.1/topics/settings/
-
-For the full list of settings and their values, see
-https://docs.djangoproject.com/en/3.1/ref/settings/
-"""
-
-import os
-from urllib.parse import urlparse
-
-from platformshconfig import Config
-
-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-# Quick-start development settings - unsuitable for production
-# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
-
-# SECURITY WARNING: keep the secret key used in production secret!
-SECRET_KEY = '5^#15wdl(qll2ue&&(-1ixwalo7%td1a(&x7abp(roabe_mk7w'
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
-ALLOWED_HOSTS = ['*']
-
-
-# Application definition
-
-INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'hello',
-]
-
-MIDDLEWARE = [
- 'django.middleware.security.SecurityMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
-]
-
-ROOT_URLCONF = 'myapp.urls'
-
-TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
- 'APP_DIRS': True,
- 'OPTIONS': {
- 'context_processors': [
- 'django.template.context_processors.debug',
- 'django.template.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'django.contrib.messages.context_processors.messages',
- ],
- },
- },
-]
-
-WSGI_APPLICATION = 'myapp.wsgi.application'
-
-
-# Database
-# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
-
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
-}
-
-
-# Password validation
-# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
-
-AUTH_PASSWORD_VALIDATORS = [
- {
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
- },
-]
-
-
-# Internationalization
-# https://docs.djangoproject.com/en/2.1/topics/i18n/
-
-LANGUAGE_CODE = 'en-us'
-
-TIME_ZONE = 'UTC'
-
-USE_I18N = True
-
-USE_L10N = True
-
-USE_TZ = True
-
-
-# Static files (CSS, JavaScript, Images)
-# https://docs.djangoproject.com/en/3.1/howto/static-files/
-
-STATIC_URL = '/static/'
-# Default STATIC_ROOT, i.e. for local testing.
-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
-
-# Import some Platform.sh settings from the environment.
-config = Config()
-if config.is_valid_platform():
-
- if config.appDir:
- STATIC_ROOT = os.path.join(config.appDir, 'static')
- if config.projectEntropy:
- SECRET_KEY = config.projectEntropy
-
- if not config.in_build():
- db_settings = config.credentials('database')
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.postgresql',
- 'NAME': db_settings['path'],
- 'USER': db_settings['username'],
- 'PASSWORD': db_settings['password'],
- 'HOST': db_settings['host'],
- 'PORT': db_settings['port'],
- },
- 'sqlite': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
- }
diff --git a/templates/django3/files/myapp/urls.py b/templates/django3/files/myapp/urls.py
deleted file mode 100644
index 729863545..000000000
--- a/templates/django3/files/myapp/urls.py
+++ /dev/null
@@ -1,22 +0,0 @@
-"""myapp URL Configuration
-
-The `urlpatterns` list routes URLs to views. For more information please see:
- https://docs.djangoproject.com/en/2.1/topics/http/urls/
-Examples:
-Function views
- 1. Add an import: from my_app import views
- 2. Add a URL to urlpatterns: path('', views.home, name='home')
-Class-based views
- 1. Add an import: from other_app.views import Home
- 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
-Including another URLconf
- 1. Import the include() function: from django.urls import include, path
- 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
-"""
-from django.contrib import admin
-from django.urls import include, path
-
-urlpatterns = [
- path('', include('hello.urls')),
- path('admin/', admin.site.urls),
-]
diff --git a/templates/django3/files/myapp/wsgi.py b/templates/django3/files/myapp/wsgi.py
deleted file mode 100644
index 964076461..000000000
--- a/templates/django3/files/myapp/wsgi.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-WSGI config for myapp project.
-
-It exposes the WSGI callable as a module-level variable named ``application``.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
-"""
-
-import os
-
-from django.core.wsgi import get_wsgi_application
-
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
-
-application = get_wsgi_application()
diff --git a/templates/django4/files/.environment b/templates/django4/files/.environment
deleted file mode 100644
index 5b0490466..000000000
--- a/templates/django4/files/.environment
+++ /dev/null
@@ -1,4 +0,0 @@
-# Updates PATH when Poetry is used, making it available during deploys and SSH.
-if [ -n "$POETRY_VERSION" ]; then
- export PATH="/app/.local/bin:$PATH"
-fi
diff --git a/templates/django4/files/.gitignore b/templates/django4/files/.gitignore
deleted file mode 100644
index 8796b0f7e..000000000
--- a/templates/django4/files/.gitignore
+++ /dev/null
@@ -1,114 +0,0 @@
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-wheels/
-share/python-wheels/
-*.egg-info/
-.installed.cfg
-*.egg
-MANIFEST
-
-# PyInstaller
-# Usually these files are written by a python script from a template
-# before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.nox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*.cover
-.hypothesis/
-.pytest_cache/
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-local_settings.py
-db.sqlite3
-
-# Scrapy stuff:
-.scrapy
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# IPython
-profile_default/
-ipython_config.py
-
-# pyenv
-.python-version
-
-# celery beat schedule file
-celerybeat-schedule
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
-.env
-.venv
-env/
-venv/
-ENV/
-env.bak/
-venv.bak/
-
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
-.dmypy.json
-dmypy.json
-
-# Pyre type checker
-.pyre/
-
-# Ignore mounts
-logs
diff --git a/templates/django4/files/.platform/pip.app.yaml b/templates/django4/files/.platform/pip.app.yaml
index bfefcf45d..97c5b053d 100644
--- a/templates/django4/files/.platform/pip.app.yaml
+++ b/templates/django4/files/.platform/pip.app.yaml
@@ -3,75 +3,117 @@
##########################
# Container configuration.
-# The name of this app. Must be unique within a project.
+# 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: 'app'
-# The runtime the application uses.
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: 'python:3.10'
-##########################
-# Builds and variables
-
-hooks:
- build: |
- set -eu
-
- # Download the latest version of pip
- python3.10 -m pip install --upgrade pip
-
- # Install dependencies
- pip install -r requirements.txt
-
- # Collect static assets
- python manage.py collectstatic
-
- deploy: python manage.py migrate
-
-##########################
-# Web configuration
-
-# The configuration of the application when it is exposed to the web.
-web:
- upstream:
- socket_family: unix
- commands:
- start: "gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
- locations:
- "/":
- passthru: true
- "/static":
- root: "static"
- expires: 1h
- allow: true
-
-##########################
-# Services
-
# 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:postgresql"
-
-##########################
-# Data and mounts
+ database: "db:postgresql"
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 512
-# Set a local R/W mount for logs
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
- 'logs':
- source: local
- source_path: logs
+ 'logs':
+ source: local
+ source_path: logs
-##########################
-# Internal maintenance
+# 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.
+ start: "gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
+
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ 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:
+ "/":
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+ "/static":
+ # The directory to serve static assets for this location relative to the app’s root directory. Must be an
+ # actual directory inside the root directory.
+ root: "static"
+ # The number of seconds whitelisted (static) content should be cached.
+ expires: 1h
+ # Whether to allow serving files which don’t match a rule.
+ allow: true
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -eu
+
+ # Download the latest version of pip
+ python3.10 -m pip install --upgrade pip
+
+ # Install dependencies
+ pip install -r requirements.txt
+ # Collect static assets
+ python manage.py collectstatic
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: python manage.py migrate
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
- operations:
- auto-update:
- command: |
- curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
\ No newline at end of file
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
+ operations:
+ auto-update:
+ command: |
+ # Upgrade pip
+ python3.10 -m pip install --upgrade pip
+
+ # Upgrade Poetry.
+ ./install-poetry.sh
+ export PATH="/app/.local/bin:$PATH"
+ poetry update --lock
+
+ # Upgrade pip
+ poetry export -f requirements.txt > requirements.txt
+
+ # Upgrade Pipenv.
+ pip install pipenv
+ pipenv update
+
+ git add Pipfile.lock poetry.lock requirements.txt
+ git commit --allow-empty -m "Dependency updates."
+# command: |
+# curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
diff --git a/templates/django4/files/.platform/pipenv.app.yaml b/templates/django4/files/.platform/pipenv.app.yaml
index 5fc0971c9..bf2803310 100644
--- a/templates/django4/files/.platform/pipenv.app.yaml
+++ b/templates/django4/files/.platform/pipenv.app.yaml
@@ -3,74 +3,110 @@
##########################
# Container configuration.
-# The name of this app. Must be unique within a project.
+# 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: 'app'
# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: 'python:3.10'
-##########################
-# Builds and variables
-
-# The build-time dependencies of the app. Uncomment if using Pipenv.
-dependencies:
- python3:
- pipenv: '2022.9.4'
-
-hooks:
- build: |
- set -eu
-
- # Download the latest version of pip
- python3.10 -m pip install --upgrade pip
-
- # Install dependencies
- pipenv install --deploy
-
- # Collect static assets
- pipenv run python manage.py collectstatic
-
- deploy: pipenv run python manage.py migrate
-
-##########################
-# Web configuration
-
-# The configuration of the application when it is exposed to the web.
-web:
- upstream:
- socket_family: unix
- commands:
- start: "pipenv run gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
- locations:
- "/":
- passthru: true
- "/static":
- root: "static"
- expires: 1h
- allow: true
-
-##########################
-# Services
-
# 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:postgresql"
+ database: "db:postgresql"
-##########################
-# Data and mounts
-
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 512
-# Set a local R/W mount for logs
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
- 'logs':
- source: local
- source_path: logs
- '.cache':
- source: local
- source_path: cache
\ No newline at end of file
+ 'logs':
+ source: local
+ source_path: logs
+ '.cache':
+ source: local
+ source_path: cache
+
+# 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.
+ start: "pipenv run gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
+
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ 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:
+ "/":
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+ "/static":
+ # The directory to serve static assets for this location relative to the app’s root directory. Must be an
+ # actual directory inside the root directory.
+ root: "static"
+ # The number of seconds whitelisted (static) content should be cached.
+ expires: 1h
+ # Whether to allow serving files which don’t match a rule.
+ allow: true
+
+# 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:
+ python3:
+ pipenv: '2022.9.4'
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -eu
+
+ # Download the latest version of pip
+ python3.10 -m pip install --upgrade pip
+
+ # Install dependencies
+ pipenv install --deploy
+
+ # Collect static assets
+ pipenv run python manage.py collectstatic
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: pipenv run python manage.py migrate
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
+source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
+ operations:
+ auto-update:
+ command: |
+ curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
diff --git a/templates/django4/files/.platform/poetry.app.yaml b/templates/django4/files/.platform/poetry.app.yaml
index 9429591b1..c961a4e50 100644
--- a/templates/django4/files/.platform/poetry.app.yaml
+++ b/templates/django4/files/.platform/poetry.app.yaml
@@ -3,82 +3,117 @@
##########################
# Container configuration.
-# The name of this app. Must be unique within a project.
+# 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: 'app'
-# The runtime the application uses.
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: 'python:3.10'
-##########################
-# Builds and variables
-
-# Build-time visible variables.
-variables:
- env:
- POETRY_VERSION: '1.1.14'
- POETRY_VIRTUALENVS_IN_PROJECT: true
- POETRY_VIRTUALENVS_CREATE: false
-
-hooks:
- build: |
- set -eu
-
- # Download the latest version of pip
- python3.10 -m pip install --upgrade pip
-
- # Install and configure Poetry
- # NOTE: There is a matching export PATH=... in `.environment`, which allows the use of Poetry
- # in the deploy hook, start command, and during SSH sessions. Make sure to include in your
- # own projects.
- export PIP_USER=false
- curl -sSL https://install.python-poetry.org | python3 - --version $POETRY_VERSION
- export PATH="/app/.local/bin:$PATH"
- export PIP_USER=true
-
- # Install dependencies
- poetry install
-
- # Collect static assets
- poetry run python manage.py collectstatic
-
- deploy: poetry run python manage.py migrate
-
-##########################
-# Web configuration
-
-# The configuration of the application when it is exposed to the web.
-web:
- upstream:
- socket_family: unix
- commands:
- start: "poetry run gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
- locations:
- "/":
- passthru: true
- "/static":
- root: "static"
- expires: 1h
- allow: true
-
-##########################
-# Services
-
# 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:postgresql"
-
-##########################
-# Data and mounts
+ database: "db:postgresql"
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 512
-# Set a local R/W mount for logs
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
- 'logs':
- source: local
- source_path: logs
+ 'logs':
+ source: local
+ source_path: logs
+
+# 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.
+ start: "poetry run gunicorn -w 4 -b unix:$SOCKET myapp.wsgi:application"
+
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ 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:
+ "/":
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+ "/static":
+ # The directory to serve static assets for this location relative to the app’s root directory. Must be an
+ # actual directory inside the root directory.
+ root: "static"
+ # The number of seconds whitelisted (static) content should be cached.
+ expires: 1h
+ # Whether to allow serving files which don’t match a rule.
+ allow: true
+
+# Variables to control the environment. More information: https://docs.platform.sh/create-apps/app-reference.html#variables
+variables:
+ env:
+ POETRY_VIRTUALENVS_IN_PROJECT: true
+ POETRY_VIRTUALENVS_CREATE: false
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -eu
+
+ # Download the latest version of pip
+ python3.10 -m pip install --upgrade pip
+
+ # Install and configure Poetry
+ # NOTE: There is a matching export PATH=... in `.environment`, which allows the use of Poetry
+ # in the deploy hook, start command, and during SSH sessions. Make sure to include in your
+ # own projects.
+ export PIP_USER=false
+ curl -sSL https://install.python-poetry.org | python3 - --version $POETRY_VERSION
+ export PATH="/app/.local/bin:$PATH"
+ export PIP_USER=true
+
+ # Install dependencies
+ poetry install
+
+ # Collect static assets
+ poetry run python manage.py collectstatic
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: poetry run python manage.py migrate
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
+source:
+ # The path where the app code lives. Defaults to the directory of the .platform.app.yaml file. Useful for multi-app setups.
+ root:
+
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
+ operations:
+ auto-update:
+ command: |
+ curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
diff --git a/templates/django4/files/.platform/routes.yaml b/templates/django4/files/.platform/routes.yaml
index ff74ad9b6..5a6dfc2f3 100644
--- a/templates/django4/files/.platform/routes.yaml
+++ b/templates/django4/files/.platform/routes.yaml
@@ -1,13 +1,14 @@
# The routes of the project.
#
-# Each route describes how an incoming URL is going to be processed by Platform.sh.
-#
-# See https://docs.platform.sh/user_guide/reference/routes-yaml.html
-
+# Each route describes how an incoming URL is going
+# to be processed by Platform.sh.
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
- type: upstream
- upstream: "app:http"
+ type: upstream
+ upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
- type: redirect
- to: "https://{default}/"
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/django4/files/.platform/services.yaml b/templates/django4/files/.platform/services.yaml
index 6f1ee67f5..c21d02f93 100644
--- a/templates/django4/files/.platform/services.yaml
+++ b/templates/django4/files/.platform/services.yaml
@@ -1,10 +1,9 @@
# The services of the project.
#
-# Each service listed will be deployed in its own container as part of your
-# Platform.sh project.
-#
-# See https://docs.platform.sh/user_guide/reference/services-yaml.html
-
+# Each service listed will be deployed
+# to power your Platform.sh project.
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
- type: postgresql:12
- disk: 1024
+ type: postgresql:12
+ disk: 1024
diff --git a/templates/django4/files/Pipfile b/templates/django4/files/Pipfile
deleted file mode 100644
index 26a7c8a7b..000000000
--- a/templates/django4/files/Pipfile
+++ /dev/null
@@ -1,14 +0,0 @@
-[[source]]
-verify_ssl = true
-url = "https://pypi.org/simple"
-name = "pypi"
-
-[packages]
-django = ">=4.0,<5.0"
-"psycopg2-binary" = "*"
-gunicorn = "*"
-
-[requires]
-python_version = "3.10"
-
-[dev-packages]
diff --git a/templates/django4/files/Pipfile.lock b/templates/django4/files/Pipfile.lock
deleted file mode 100644
index 65f13d093..000000000
--- a/templates/django4/files/Pipfile.lock
+++ /dev/null
@@ -1,115 +0,0 @@
-{
- "_meta": {
- "hash": {
- "sha256": "49da925aeda07d919efeef8b0ecd76d94145d30981f33702d653b98fdc2df55c"
- },
- "pipfile-spec": 6,
- "requires": {
- "python_version": "3.10"
- },
- "sources": [
- {
- "name": "pypi",
- "url": "https://pypi.org/simple",
- "verify_ssl": true
- }
- ]
- },
- "default": {
- "asgiref": {
- "hashes": [
- "sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4",
- "sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424"
- ],
- "markers": "python_version >= '3.7'",
- "version": "==3.5.2"
- },
- "django": {
- "hashes": [
- "sha256:a153ffd5143bf26a877bfae2f4ec736ebd8924a46600ca089ad96b54a1d4e28e",
- "sha256:acb21fac9275f9972d81c7caf5761a89ec3ea25fe74545dd26b8a48cb3a0203e"
- ],
- "index": "pypi",
- "version": "==4.1.1"
- },
- "gunicorn": {
- "hashes": [
- "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e",
- "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"
- ],
- "index": "pypi",
- "version": "==20.1.0"
- },
- "psycopg2-binary": {
- "hashes": [
- "sha256:01310cf4cf26db9aea5158c217caa92d291f0500051a6469ac52166e1a16f5b7",
- "sha256:083a55275f09a62b8ca4902dd11f4b33075b743cf0d360419e2051a8a5d5ff76",
- "sha256:090f3348c0ab2cceb6dfbe6bf721ef61262ddf518cd6cc6ecc7d334996d64efa",
- "sha256:0a29729145aaaf1ad8bafe663131890e2111f13416b60e460dae0a96af5905c9",
- "sha256:0c9d5450c566c80c396b7402895c4369a410cab5a82707b11aee1e624da7d004",
- "sha256:10bb90fb4d523a2aa67773d4ff2b833ec00857f5912bafcfd5f5414e45280fb1",
- "sha256:12b11322ea00ad8db8c46f18b7dfc47ae215e4df55b46c67a94b4effbaec7094",
- "sha256:152f09f57417b831418304c7f30d727dc83a12761627bb826951692cc6491e57",
- "sha256:15803fa813ea05bef089fa78835118b5434204f3a17cb9f1e5dbfd0b9deea5af",
- "sha256:15c4e4cfa45f5a60599d9cec5f46cd7b1b29d86a6390ec23e8eebaae84e64554",
- "sha256:183a517a3a63503f70f808b58bfbf962f23d73b6dccddae5aa56152ef2bcb232",
- "sha256:1f14c8b0942714eb3c74e1e71700cbbcb415acbc311c730370e70c578a44a25c",
- "sha256:1f6b813106a3abdf7b03640d36e24669234120c72e91d5cbaeb87c5f7c36c65b",
- "sha256:280b0bb5cbfe8039205c7981cceb006156a675362a00fe29b16fbc264e242834",
- "sha256:2d872e3c9d5d075a2e104540965a1cf898b52274a5923936e5bfddb58c59c7c2",
- "sha256:2f9ffd643bc7349eeb664eba8864d9e01f057880f510e4681ba40a6532f93c71",
- "sha256:3303f8807f342641851578ee7ed1f3efc9802d00a6f83c101d21c608cb864460",
- "sha256:35168209c9d51b145e459e05c31a9eaeffa9a6b0fd61689b48e07464ffd1a83e",
- "sha256:3a79d622f5206d695d7824cbf609a4f5b88ea6d6dab5f7c147fc6d333a8787e4",
- "sha256:404224e5fef3b193f892abdbf8961ce20e0b6642886cfe1fe1923f41aaa75c9d",
- "sha256:46f0e0a6b5fa5851bbd9ab1bc805eef362d3a230fbdfbc209f4a236d0a7a990d",
- "sha256:47133f3f872faf28c1e87d4357220e809dfd3fa7c64295a4a148bcd1e6e34ec9",
- "sha256:526ea0378246d9b080148f2d6681229f4b5964543c170dd10bf4faaab6e0d27f",
- "sha256:53293533fcbb94c202b7c800a12c873cfe24599656b341f56e71dd2b557be063",
- "sha256:539b28661b71da7c0e428692438efbcd048ca21ea81af618d845e06ebfd29478",
- "sha256:57804fc02ca3ce0dbfbef35c4b3a4a774da66d66ea20f4bda601294ad2ea6092",
- "sha256:63638d875be8c2784cfc952c9ac34e2b50e43f9f0a0660b65e2a87d656b3116c",
- "sha256:6472a178e291b59e7f16ab49ec8b4f3bdada0a879c68d3817ff0963e722a82ce",
- "sha256:68641a34023d306be959101b345732360fc2ea4938982309b786f7be1b43a4a1",
- "sha256:6e82d38390a03da28c7985b394ec3f56873174e2c88130e6966cb1c946508e65",
- "sha256:761df5313dc15da1502b21453642d7599d26be88bff659382f8f9747c7ebea4e",
- "sha256:7af0dd86ddb2f8af5da57a976d27cd2cd15510518d582b478fbb2292428710b4",
- "sha256:7b1e9b80afca7b7a386ef087db614faebbf8839b7f4db5eb107d0f1a53225029",
- "sha256:874a52ecab70af13e899f7847b3e074eeb16ebac5615665db33bce8a1009cf33",
- "sha256:887dd9aac71765ac0d0bac1d0d4b4f2c99d5f5c1382d8b770404f0f3d0ce8a39",
- "sha256:8b344adbb9a862de0c635f4f0425b7958bf5a4b927c8594e6e8d261775796d53",
- "sha256:8fc53f9af09426a61db9ba357865c77f26076d48669f2e1bb24d85a22fb52307",
- "sha256:91920527dea30175cc02a1099f331aa8c1ba39bf8b7762b7b56cbf54bc5cce42",
- "sha256:93cd1967a18aa0edd4b95b1dfd554cf15af657cb606280996d393dadc88c3c35",
- "sha256:99485cab9ba0fa9b84f1f9e1fef106f44a46ef6afdeec8885e0b88d0772b49e8",
- "sha256:9d29409b625a143649d03d0fd7b57e4b92e0ecad9726ba682244b73be91d2fdb",
- "sha256:a29b3ca4ec9defec6d42bf5feb36bb5817ba3c0230dd83b4edf4bf02684cd0ae",
- "sha256:a9e1f75f96ea388fbcef36c70640c4efbe4650658f3d6a2967b4cc70e907352e",
- "sha256:accfe7e982411da3178ec690baaceaad3c278652998b2c45828aaac66cd8285f",
- "sha256:adf20d9a67e0b6393eac162eb81fb10bc9130a80540f4df7e7355c2dd4af9fba",
- "sha256:af9813db73395fb1fc211bac696faea4ca9ef53f32dc0cfa27e4e7cf766dcf24",
- "sha256:b1c8068513f5b158cf7e29c43a77eb34b407db29aca749d3eb9293ee0d3103ca",
- "sha256:bda845b664bb6c91446ca9609fc69f7db6c334ec5e4adc87571c34e4f47b7ddb",
- "sha256:c381bda330ddf2fccbafab789d83ebc6c53db126e4383e73794c74eedce855ef",
- "sha256:c3ae8e75eb7160851e59adc77b3a19a976e50622e44fd4fd47b8b18208189d42",
- "sha256:d1c1b569ecafe3a69380a94e6ae09a4789bbb23666f3d3a08d06bbd2451f5ef1",
- "sha256:def68d7c21984b0f8218e8a15d514f714d96904265164f75f8d3a70f9c295667",
- "sha256:dffc08ca91c9ac09008870c9eb77b00a46b3378719584059c034b8945e26b272",
- "sha256:e3699852e22aa68c10de06524a3721ade969abf382da95884e6a10ff798f9281",
- "sha256:e847774f8ffd5b398a75bc1c18fbb56564cda3d629fe68fd81971fece2d3c67e",
- "sha256:ffb7a888a047696e7f8240d649b43fb3644f14f0ee229077e7f6b9f9081635bd"
- ],
- "index": "pypi",
- "version": "==2.9.3"
- },
- "sqlparse": {
- "hashes": [
- "sha256:0c00730c74263a94e5a9919ade150dfc3b19c574389985446148402998287dae",
- "sha256:48719e356bb8b42991bdbb1e8b83223757b93789c00910a616a071910ca4a64d"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==0.4.2"
- }
- },
- "develop": {}
-}
diff --git a/templates/django4/files/README.md b/templates/django4/files/README.md
deleted file mode 100644
index 5c19d995f..000000000
--- a/templates/django4/files/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# Django 4 for Platform.sh
-
-
-
-This template deploys the Django 4 application framework on Platform.sh, using the gunicorn application runner. It also includes a PostgreSQL database connection pre-configured.
-
-Django is a Python-based web application framework with a built-in ORM.
-
-## Features
-
-* Python 3.10
-* PostgreSQL 12
-* Automatic TLS certificates
-* Pip-based builds
-
-## Customizations
-
-The following files have been added to a basic Django configuration. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform/applications.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* A rudimentary `myapp` application is included for demonstration purposes. In particular, the `settings.py` file is set up to configure Django to connect to the correct database, and run in Debug mode when not running the `master` branch. You are free to change that configuration if you prefer.
-
-## Package managers
-
-By default, this template uses `pip` to manage dependencies.
-The `applications.yaml` file has been defined to download the latest version of `pip` into the container, then to use it to install dependencies during the build hook when the file system is writable.
-
-If, however, you would like to use another tool (pipenv or Poetry), alternate app configurations have been provided in the same file to use them.
-`applications.yaml` contains configuration for three applications in an array:
-
-```yaml
-- !include pip.app.yaml
-# - !include pipenv.app.yaml
-# - !include poetry.app.yaml
-```
-
-To use a different build and package manager, comment out the pip configuration object, and uncomment either the pipenv or Poetry line that links to their individual configuration files.
-
-The presence of these variations is only meant to serve as a demo.
-If you are using this template as a guide for deploying your own project on Platform.sh, it's sufficient to create a `.platform.app.yaml` file at the root of your repository, and then copy the contents of one of the desired configuration files into it (rather than including an `applications.yaml` with `!include` keys).
-
-## References
-
-* [Django](https://www.djangoproject.com/)
-* [Python on Platform.sh](https://docs.platform.sh/languages/python.html)
diff --git a/templates/django4/files/hello/__init__.py b/templates/django4/files/hello/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/django4/files/hello/admin.py b/templates/django4/files/hello/admin.py
deleted file mode 100644
index 8c38f3f3d..000000000
--- a/templates/django4/files/hello/admin.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.contrib import admin
-
-# Register your models here.
diff --git a/templates/django4/files/hello/apps.py b/templates/django4/files/hello/apps.py
deleted file mode 100644
index 73434282c..000000000
--- a/templates/django4/files/hello/apps.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from django.apps import AppConfig
-
-
-class HelloConfig(AppConfig):
- name = 'hello'
diff --git a/templates/django4/files/hello/migrations/__init__.py b/templates/django4/files/hello/migrations/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/django4/files/hello/models.py b/templates/django4/files/hello/models.py
deleted file mode 100644
index 71a836239..000000000
--- a/templates/django4/files/hello/models.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.db import models
-
-# Create your models here.
diff --git a/templates/django4/files/hello/templates/base.html b/templates/django4/files/hello/templates/base.html
deleted file mode 100644
index 32b22dc71..000000000
--- a/templates/django4/files/hello/templates/base.html
+++ /dev/null
@@ -1,48 +0,0 @@
-{% load i18n static %}
-{% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %}
-
-
-{% block title %}{% endblock %}
-{% block extrastyle %}{% endblock %}
-{% if LANGUAGE_BIDI %}{% endif %}
-{% block extrahead %}{% endblock %}
-
-
-
-
-
-{% block blockbots %}{% endblock %}
-
-{% load i18n %}
-
-
-
-
-
-
-
Example
-
-
-
-
-
-
{{ message }}
-
Continuous Deployment Cloud Hosting
- Blazing fast hosting. No more failed deployments. No more downtime. Improved web development productivity.
-
-
-
diff --git a/templates/django4/files/hello/tests.py b/templates/django4/files/hello/tests.py
deleted file mode 100644
index 7ce503c2d..000000000
--- a/templates/django4/files/hello/tests.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/templates/django4/files/hello/urls.py b/templates/django4/files/hello/urls.py
deleted file mode 100644
index 88a9caca8..000000000
--- a/templates/django4/files/hello/urls.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from django.urls import path
-
-from . import views
-
-urlpatterns = [
- path('', views.index, name='index'),
-]
diff --git a/templates/django4/files/hello/views.py b/templates/django4/files/hello/views.py
deleted file mode 100644
index 1ab7e7994..000000000
--- a/templates/django4/files/hello/views.py
+++ /dev/null
@@ -1,10 +0,0 @@
-from django.http import HttpResponse
-from django.template import loader
-
-
-def index(request):
- template = loader.get_template('base.html')
- context = {
- 'message': "Hello, and welcome to the Platform.sh world",
- }
- return HttpResponse(template.render(context, request))
diff --git a/templates/django4/files/manage.py b/templates/django4/files/manage.py
deleted file mode 100644
index ed184bffe..000000000
--- a/templates/django4/files/manage.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-import os
-import sys
-
-if __name__ == '__main__':
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
- try:
- from django.core.management import execute_from_command_line
- except ImportError as exc:
- raise ImportError(
- "Couldn't import Django. Are you sure it's installed and "
- "available on your PYTHONPATH environment variable? Did you "
- "forget to activate a virtual environment?"
- ) from exc
- execute_from_command_line(sys.argv)
diff --git a/templates/django4/files/myapp/__init__.py b/templates/django4/files/myapp/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/django4/files/myapp/settings.py b/templates/django4/files/myapp/settings.py
deleted file mode 100644
index 859d95dba..000000000
--- a/templates/django4/files/myapp/settings.py
+++ /dev/null
@@ -1,179 +0,0 @@
-"""
-Django settings for myapp project.
-
-Generated by 'django-admin startproject' using Django 3.1.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/3.1/topics/settings/
-
-For the full list of settings and their values, see
-https://docs.djangoproject.com/en/3.1/ref/settings/
-"""
-
-import os
-import sys
-import json
-import base64
-from pathlib import Path
-
-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-# Quick-start development settings - unsuitable for production
-# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
-
-# SECURITY WARNING: keep the secret key used in production secret!
-SECRET_KEY = '5^#15wdl(qll2ue&&(-1ixwalo7%td1a(&x7abp(roabe_mk7w'
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
-ALLOWED_HOSTS = [
- 'localhost',
- '127.0.0.1',
- '.platformsh.site',
-]
-
-# Application definition
-
-INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'hello',
-]
-
-MIDDLEWARE = [
- 'django.middleware.security.SecurityMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
-]
-
-ROOT_URLCONF = 'myapp.urls'
-
-TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
- 'APP_DIRS': True,
- 'OPTIONS': {
- 'context_processors': [
- 'django.template.context_processors.debug',
- 'django.template.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'django.contrib.messages.context_processors.messages',
- ],
- },
- },
-]
-
-WSGI_APPLICATION = 'myapp.wsgi.application'
-
-# Database
-# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
-
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
-}
-
-# Password validation
-# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
-
-AUTH_PASSWORD_VALIDATORS = [
- {
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
- },
-]
-
-
-# Internationalization
-# https://docs.djangoproject.com/en/2.1/topics/i18n/
-
-LANGUAGE_CODE = 'en-us'
-
-TIME_ZONE = 'UTC'
-
-USE_I18N = True
-
-USE_L10N = True
-
-USE_TZ = False
-
-
-# Static files (CSS, JavaScript, Images)
-# https://docs.djangoproject.com/en/3.1/howto/static-files/
-
-STATIC_URL = '/static/'
-# Default STATIC_ROOT, i.e. for local testing.
-STATIC_ROOT = os.path.join(BASE_DIR, 'static')
-
-#################################################################################
-# Platform.sh-specific configuration
-
-# This variable should always match the primary database relationship name,
-# configured in .platform.app.yaml.
-PLATFORMSH_DB_RELATIONSHIP="database"
-
-# Helper function for decoding base64-encoded JSON variables.
-def decode(variable):
- """Decodes a Platform.sh environment variable.
- Args:
- variable (string):
- Base64-encoded JSON (the content of an environment variable).
- Returns:
- An dict (if representing a JSON object), or a scalar type.
- Raises:
- JSON decoding error.
- """
- try:
- if sys.version_info[1] > 5:
- return json.loads(base64.b64decode(variable))
- else:
- return json.loads(base64.b64decode(variable).decode('utf-8'))
- except json.decoder.JSONDecodeError:
- print('Error decoding JSON, code %d', json.decoder.JSONDecodeError)
-
-# Import some Platform.sh settings from the environment.
-if (os.getenv('PLATFORM_APPLICATION_NAME') is not None):
- DEBUG = False
- if (os.getenv('PLATFORM_APP_DIR') is not None):
- STATIC_ROOT = os.path.join(os.getenv('PLATFORM_APP_DIR'), 'static')
- if (os.getenv('PLATFORM_PROJECT_ENTROPY') is not None):
- SECRET_KEY = os.getenv('PLATFORM_PROJECT_ENTROPY')
- # Database service configuration, post-build only.
- if (os.getenv('PLATFORM_ENVIRONMENT') is not None):
- platformRelationships = decode(os.getenv('PLATFORM_RELATIONSHIPS'))
- db_settings = platformRelationships[PLATFORMSH_DB_RELATIONSHIP][0]
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.postgresql',
- 'NAME': db_settings['path'],
- 'USER': db_settings['username'],
- 'PASSWORD': db_settings['password'],
- 'HOST': db_settings['host'],
- 'PORT': db_settings['port'],
- },
- 'sqlite': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
- }
diff --git a/templates/django4/files/myapp/urls.py b/templates/django4/files/myapp/urls.py
deleted file mode 100644
index 729863545..000000000
--- a/templates/django4/files/myapp/urls.py
+++ /dev/null
@@ -1,22 +0,0 @@
-"""myapp URL Configuration
-
-The `urlpatterns` list routes URLs to views. For more information please see:
- https://docs.djangoproject.com/en/2.1/topics/http/urls/
-Examples:
-Function views
- 1. Add an import: from my_app import views
- 2. Add a URL to urlpatterns: path('', views.home, name='home')
-Class-based views
- 1. Add an import: from other_app.views import Home
- 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
-Including another URLconf
- 1. Import the include() function: from django.urls import include, path
- 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
-"""
-from django.contrib import admin
-from django.urls import include, path
-
-urlpatterns = [
- path('', include('hello.urls')),
- path('admin/', admin.site.urls),
-]
diff --git a/templates/django4/files/myapp/wsgi.py b/templates/django4/files/myapp/wsgi.py
deleted file mode 100644
index 964076461..000000000
--- a/templates/django4/files/myapp/wsgi.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-WSGI config for myapp project.
-
-It exposes the WSGI callable as a module-level variable named ``application``.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
-"""
-
-import os
-
-from django.core.wsgi import get_wsgi_application
-
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
-
-application = get_wsgi_application()
diff --git a/templates/django4/files/poetry.lock b/templates/django4/files/poetry.lock
deleted file mode 100644
index bc3b8c546..000000000
--- a/templates/django4/files/poetry.lock
+++ /dev/null
@@ -1,78 +0,0 @@
-[[package]]
-name = "asgiref"
-version = "3.5.2"
-description = "ASGI specs, helper code, and adapters"
-category = "main"
-optional = false
-python-versions = ">=3.7"
-
-[package.extras]
-tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"]
-
-[[package]]
-name = "django"
-version = "4.1.1"
-description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design."
-category = "main"
-optional = false
-python-versions = ">=3.8"
-
-[package.dependencies]
-asgiref = ">=3.5.2,<4"
-sqlparse = ">=0.2.2"
-tzdata = {version = "*", markers = "sys_platform == \"win32\""}
-
-[package.extras]
-argon2 = ["argon2-cffi (>=19.1.0)"]
-bcrypt = ["bcrypt"]
-
-[[package]]
-name = "gunicorn"
-version = "20.1.0"
-description = "WSGI HTTP Server for UNIX"
-category = "main"
-optional = false
-python-versions = ">=3.5"
-
-[package.extras]
-eventlet = ["eventlet (>=0.24.1)"]
-gevent = ["gevent (>=1.4.0)"]
-setproctitle = ["setproctitle"]
-tornado = ["tornado (>=0.2)"]
-
-[[package]]
-name = "psycopg2-binary"
-version = "2.9.3"
-description = "psycopg2 - Python-PostgreSQL Database Adapter"
-category = "main"
-optional = false
-python-versions = ">=3.6"
-
-[[package]]
-name = "sqlparse"
-version = "0.4.2"
-description = "A non-validating SQL parser."
-category = "main"
-optional = false
-python-versions = ">=3.5"
-
-[[package]]
-name = "tzdata"
-version = "2022.2"
-description = "Provider of IANA time zone data"
-category = "main"
-optional = false
-python-versions = ">=2"
-
-[metadata]
-lock-version = "1.1"
-python-versions = "^3.10"
-content-hash = "c40bd2ee78cd61ee8a17c6aeaa63a82d843e0b319577a73369b56afa85e2d455"
-
-[metadata.files]
-asgiref = []
-django = []
-gunicorn = []
-psycopg2-binary = []
-sqlparse = []
-tzdata = []
diff --git a/templates/django4/files/pyproject.toml b/templates/django4/files/pyproject.toml
deleted file mode 100644
index 7b9b4bdb2..000000000
--- a/templates/django4/files/pyproject.toml
+++ /dev/null
@@ -1,18 +0,0 @@
-[tool.poetry]
-name = "platformsh-django4"
-version = "0.1.0"
-description = "A Platform.sh starter for Django 4"
-authors = ["chadcarlson "]
-license = "MIT"
-
-[tool.poetry.dependencies]
-python = "^3.10"
-Django = "^4.1.1"
-psycopg2-binary = "^2.9.3"
-gunicorn = "^20.1.0"
-
-[tool.poetry.dev-dependencies]
-
-[build-system]
-requires = ["poetry-core>=1.0.0"]
-build-backend = "poetry.core.masonry.api"
diff --git a/templates/django4/files/requirements.txt b/templates/django4/files/requirements.txt
deleted file mode 100644
index 836603af1..000000000
--- a/templates/django4/files/requirements.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-asgiref==3.5.2; python_version >= '3.7'
-django==4.1.1
-gunicorn==20.1.0
-psycopg2-binary==2.9.2
-setuptools==63.1.0; python_version >= '3.7'
-sqlparse==0.4.2; python_version >= '3.5'
diff --git a/templates/drupal10/files/.blackfire.yml b/templates/drupal10/files/.blackfire.yml
deleted file mode 100644
index 78f90ecd4..000000000
--- a/templates/drupal10/files/.blackfire.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-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/drupal10/files/.ddev/config.yml b/templates/drupal10/files/.ddev/config.yml
deleted file mode 100644
index 3f12e702b..000000000
--- a/templates/drupal10/files/.ddev/config.yml
+++ /dev/null
@@ -1,199 +0,0 @@
-type: drupal10
-docroot: web
-database:
- type: mariadb
- version: "10.4"
-mutagen_enabled: false
-use_dns_when_possible: true
-composer_version: "2.1"
-web_environment: []
-php_version: "8.1"
-nodejs_version: "16"
-
-# Key features of ddev's config.yaml:
-
-# name: # Name of the project, automatically provides
-# http://projectname.ddev.site and https://projectname.ddev.site
-
-# type: # drupal6/7/8/9/10, backdrop, typo3, wordpress, php
-
-# docroot: # Relative path to the directory containing index.php.
-
-# php_version: "7.4" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"
-
-# You can explicitly specify the webimage but this
-# is not recommended, as the images are often closely tied to ddev's' behavior,
-# so this can break upgrades.
-
-# webimage: # nginx/php docker image.
-
-# database:
-# type: # mysql, mariadb
-# version: # database version, like "10.3" or "8.0"
-# Note that mariadb_version or mysql_version from v1.18 and earlier
-# will automatically be converted to this notation with just a "ddev config --auto"
-
-# router_http_port: # Port to be used for http (defaults to port 80)
-# router_https_port: # Port for https (defaults to 443)
-
-# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart"
-# Note that for most people the commands
-# "ddev xdebug" to enable xdebug and "ddev xdebug off" to disable it work better,
-# as leaving xdebug enabled all the time is a big performance hit.
-
-# xhprof_enabled: false # Set to true to enable xhprof and "ddev start" or "ddev restart"
-# Note that for most people the commands
-# "ddev xhprof" to enable xhprof and "ddev xhprof off" to disable it work better,
-# as leaving xhprof enabled all the time is a big performance hit.
-
-# webserver_type: nginx-fpm # or apache-fpm
-
-# timezone: Europe/Berlin
-# This is the timezone used in the containers and by PHP;
-# it can be set to any valid timezone,
-# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
-# For example Europe/Dublin or MST7MDT
-
-# composer_root:
-# Relative path to the composer root directory from the project root. This is
-# the directory which contains the composer.json and where all Composer related
-# commands are executed.
-
-# composer_version: "2"
-# if composer_version:"2" it will use the most recent composer v2
-# It can also be set to "1", to get most recent composer v1
-# or "" for the default v2 created at release time.
-# It can be set to any existing specific composer version.
-# After first project 'ddev start' this will not be updated until it changes
-
-# nodejs_version: "16"
-# change from the default system Node.js version to another supported version, like 12, 14, 17.
-# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any
-# Node.js version, including v6, etc.
-
-# additional_hostnames:
-# - somename
-# - someothername
-# would provide http and https URLs for "somename.ddev.site"
-# and "someothername.ddev.site".
-
-# additional_fqdns:
-# - example.com
-# - sub1.example.com
-# would provide http and https URLs for "example.com" and "sub1.example.com"
-# Please take care with this because it can cause great confusion.
-
-# upload_dir: custom/upload/dir
-# would set the destination path for ddev import-files to /custom/upload/dir
-
-# working_dir:
-# web: /var/www/html
-# db: /home
-# would set the default working directory for the web and db services.
-# These values specify the destination directory for ddev ssh and the
-# directory in which commands passed into ddev exec are run.
-
-# omit_containers: [db, dba, ddev-ssh-agent]
-# Currently only these containers are supported. Some containers can also be
-# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
-# the "db" container, several standard features of ddev that access the
-# database container will be unusable. In the global configuration it is also
-# possible to omit ddev-router, but not here.
-
-# nfs_mount_enabled: false
-# Great performance improvement but requires host configuration first.
-# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container
-
-# mutagen_enabled: false
-# Experimental performance improvement using mutagen asynchronous updates.
-# See https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen
-
-# fail_on_hook_fail: False
-# Decide whether 'ddev start' should be interrupted by a failing hook
-
-# host_https_port: "59002"
-# The host port binding for https can be explicitly specified. It is
-# dynamic unless otherwise specified.
-# This is not used by most people, most people use the *router* instead
-# of the localhost port.
-
-# host_webserver_port: "59001"
-# The host port binding for the ddev-webserver can be explicitly specified. It is
-# dynamic unless otherwise specified.
-# This is not used by most people, most people use the *router* instead
-# of the localhost port.
-
-# host_db_port: "59002"
-# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
-# unless explicitly specified.
-
-# phpmyadmin_port: "8036"
-# phpmyadmin_https_port: "8037"
-# The PHPMyAdmin ports can be changed from the default 8036 and 8037
-
-# host_phpmyadmin_port: "8036"
-# The phpmyadmin (dba) port is not normally bound on the host at all, instead being routed
-# through ddev-router, but it can be specified and bound.
-
-# mailhog_port: "8025"
-# mailhog_https_port: "8026"
-# The MailHog ports can be changed from the default 8025 and 8026
-
-# host_mailhog_port: "8025"
-# The mailhog port is not normally bound on the host at all, instead being routed
-# through ddev-router, but it can be bound directly to localhost if specified here.
-
-# webimage_extra_packages: [php7.4-tidy, php-bcmath]
-# Extra Debian packages that are needed in the webimage can be added here
-
-# dbimage_extra_packages: [telnet,netcat]
-# Extra Debian packages that are needed in the dbimage can be added here
-
-# use_dns_when_possible: true
-# If the host has internet access and the domain configured can
-# successfully be looked up, DNS will be used for hostname resolution
-# instead of editing /etc/hosts
-# Defaults to true
-
-# project_tld: ddev.site
-# The top-level domain used for project URLs
-# The default "ddev.site" allows DNS lookup via a wildcard
-# If you prefer you can change this to "ddev.local" to preserve
-# pre-v1.9 behavior.
-
-# ngrok_args: --subdomain mysite --auth username:pass
-# Provide extra flags to the "ngrok http" command, see
-# https://ngrok.com/docs#http or run "ngrok http -h"
-
-# disable_settings_management: false
-# If true, ddev will not create CMS-specific settings files like
-# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
-# In this case the user must provide all such settings.
-
-# You can inject environment variables into the web container with:
-# web_environment:
-# - SOMEENV=somevalue
-# - SOMEOTHERENV=someothervalue
-
-# no_project_mount: false
-# (Experimental) If true, ddev will not mount the project into the web container;
-# the user is responsible for mounting it manually or via a script.
-# This is to enable experimentation with alternate file mounting strategies.
-# For advanced users only!
-
-# bind_all_interfaces: false
-# If true, host ports will be bound on all network interfaces,
-# not just the localhost interface. This means that ports
-# will be available on the local network if the host firewall
-# allows it.
-
-# Many ddev commands can be extended to run tasks before or after the
-# ddev command is executed, for example "post-start", "post-import-db",
-# "pre-composer", "post-composer"
-# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
-# information on the commands that can be extended and the tasks you can define
-# for them. Example:
-#hooks:
-# post-import-db:
-# - exec: drush cr
-# - exec: drush updb
diff --git a/templates/drupal10/files/.ddev/providers/platform.yaml b/templates/drupal10/files/.ddev/providers/platform.yaml
deleted file mode 100755
index 19ce7501c..000000000
--- a/templates/drupal10/files/.ddev/providers/platform.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-#ddev-generated
-# Example Platform.sh provider configuration.
-
-# To use this configuration,
-
-# 1. Check out the site from platform.sh and then configure it with `ddev config`. You'll want to use `ddev start` and make sure the basic functionality is working.
-# 2. Obtain and configure an API token.
-# a. Login to the Platform.sh Dashboard and go to Account->API Tokens to create an API token for ddev to use.
-# b. Add the API token to the `web_environment` section in your global ddev configuration at ~/.ddev/global_config.yaml:
-# ```yaml
-# web_environment:
-# - PLATFORMSH_CLI_TOKEN=abcdeyourtoken
-# ```
-# 3. `ddev restart`
-# 4. Obtain your project id with `ddev exec platform`. The platform tool should show you all the information about your account and project.
-# 5. In your project's .ddev/providers directory, copy platform.yaml.example to platform.yaml and edit the `project_id` and `environment_name`.
-# 6. Run `ddev pull platform`. After you agree to the prompt, the current upstream database and files will be downloaded.
-# 7. Optionally use `ddev push platform` to push local files and database to platform.sh. Note that `ddev push` is a command that can potentially damage your production site, so this is not recommended.
-
-# Debugging: Use `ddev exec platform` to see what platform.sh knows about
-# your configuration and whether it's working correctly.
-
-environment_variables:
- project_id: yourproject
- environment: main
- application: drupal
-
-auth_command:
- command: |
- set -eu -o pipefail
- if [ -z "${PLATFORMSH_CLI_TOKEN:-}" ]; then echo "Please make sure you have set PLATFORMSH_CLI_TOKEN in ~/.ddev/global_config.yaml" && exit 1; fi
-
-db_pull_command:
- command: |
- set -x # You can enable bash debugging output by uncommenting
- set -eu -o pipefail
- ls /var/www/html/.ddev >/dev/null # This just refreshes stale NFS if possible
- platform db:dump --yes --gzip --file=/var/www/html/.ddev/.downloads/db.sql.gz --project="${project_id}" --environment="${environment}" --app="${application}"
-
-files_pull_command:
- command: |
- set -x # You can enable bash debugging output by uncommenting
- set -eu -o pipefail
- ls /var/www/html/.ddev >/dev/null # This just refreshes stale NFS if possible
- platform mount:download --yes --quiet --project="${project_id}" --environment="${environment}" --app="${application}" --mount=web/sites/default/files --target=/var/www/html/.ddev/.downloads/files
-
-
-# push is a dangerous command. If not absolutely needed it's better to delete these lines.
-db_push_command:
- command: |
- set -x # You can enable bash debugging output by uncommenting
- set -eu -o pipefail
- ls /var/www/html/.ddev >/dev/null # This just refreshes stale NFS if possible
- pushd /var/www/html/.ddev/.downloads >/dev/null;
- gzip -dc db.sql.gz | platform db:sql --project="${project_id}" --environment="${environment}"
-
-# push is a dangerous command. If not absolutely needed it's better to delete these lines.
-files_push_command:
- command: |
- set -x # You can enable bash debugging output by uncommenting
- set -eu -o pipefail
- ls "${DDEV_FILES_DIR}" >/dev/null # This just refreshes stale NFS if possible
- platform mount:upload --yes --quiet --project="${project_id}" --environment="${environment}" --source="${DDEV_FILES_DIR}" --mount=web/sites/default/files
diff --git a/templates/drupal10/files/.editorconfig b/templates/drupal10/files/.editorconfig
deleted file mode 100644
index 76b0d7c09..000000000
--- a/templates/drupal10/files/.editorconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-# Drupal editor configuration normalization
-# @see http://editorconfig.org/
-
-# This is the top-most .editorconfig file; do not search in parent directories.
-root = true
-
-# All files.
-[*]
-end_of_line = LF
-indent_style = space
-indent_size = 2
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[composer.{json,lock}]
-indent_size = 4
-
-[.platform.app.yaml]
-indent_size = 4
diff --git a/templates/drupal10/files/.environment b/templates/drupal10/files/.environment
deleted file mode 100644
index 3e0014164..000000000
--- a/templates/drupal10/files/.environment
+++ /dev/null
@@ -1,11 +0,0 @@
-# Statements in this file will be executed (sourced) by the shell in SSH
-# sessions, in deploy hooks, in cron jobs, and in the application's runtime
-# environment. This file must be placed in the root of the application, not
-# necessarily the git repository's root. In case of multiple applications,
-# each application can have its own .environment file.
-
-# Allow executable app dependencies from Composer to be run from the path.
-if [ -n "$PLATFORM_APP_DIR" -a -f "$PLATFORM_APP_DIR"/composer.json ] ; then
- bin=$(composer config bin-dir --working-dir="$PLATFORM_APP_DIR" --no-interaction 2>/dev/null)
- export PATH="${PLATFORM_APP_DIR}/${bin:-vendor/bin}:${PATH}"
-fi
diff --git a/templates/drupal10/files/.gitattributes b/templates/drupal10/files/.gitattributes
deleted file mode 100644
index a37894e8e..000000000
--- a/templates/drupal10/files/.gitattributes
+++ /dev/null
@@ -1,61 +0,0 @@
-# Drupal git normalization
-# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
-# @see https://www.drupal.org/node/1542048
-
-# Normally these settings would be done with macro attributes for improved
-# readability and easier maintenance. However macros can only be defined at the
-# repository root directory. Drupal avoids making any assumptions about where it
-# is installed.
-
-# Define text file attributes.
-# - Treat them as text.
-# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
-# - Detect whitespace errors.
-# - Exposed by default in `git diff --color` on the CLI.
-# - Validate with `git diff --check`.
-# - Deny applying with `git apply --whitespace=error-all`.
-# - Fix automatically with `git apply --whitespace=fix`.
-
-*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
-*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-
-# Define binary file attributes.
-# - Do not treat them as text.
-# - Include binary diff in patches instead of "binary files differ."
-*.eot -text diff
-*.exe -text diff
-*.gif -text diff
-*.gz -text diff
-*.ico -text diff
-*.jpeg -text diff
-*.jpg -text diff
-*.otf -text diff
-*.phar -text diff
-*.png -text diff
-*.svgz -text diff
-*.ttf -text diff
-*.woff -text diff
-*.woff2 -text diff
diff --git a/templates/drupal10/files/.github/ISSUE_TEMPLATE/bug_report.yaml b/templates/drupal10/files/.github/ISSUE_TEMPLATE/bug_report.yaml
deleted file mode 100644
index 8b8fb71ce..000000000
--- a/templates/drupal10/files/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
-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
diff --git a/templates/drupal10/files/.github/ISSUE_TEMPLATE/config.yaml b/templates/drupal10/files/.github/ISSUE_TEMPLATE/config.yaml
deleted file mode 100644
index 6391f6f4d..000000000
--- a/templates/drupal10/files/.github/ISSUE_TEMPLATE/config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-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/drupal10/files/.github/ISSUE_TEMPLATE/improvements.yaml b/templates/drupal10/files/.github/ISSUE_TEMPLATE/improvements.yaml
deleted file mode 100644
index 10c727e7c..000000000
--- a/templates/drupal10/files/.github/ISSUE_TEMPLATE/improvements.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-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/drupal10/files/.github/PULL_REQUEST_TEMPLATE.md b/templates/drupal10/files/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index b41bea1c8..000000000
--- a/templates/drupal10/files/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## 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/drupal10/files/.gitignore b/templates/drupal10/files/.gitignore
deleted file mode 100644
index 6b6444a2c..000000000
--- a/templates/drupal10/files/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
diff --git a/templates/drupal10/files/.lando.upstream.yml b/templates/drupal10/files/.lando.upstream.yml
deleted file mode 100644
index bcb131f75..000000000
--- a/templates/drupal10/files/.lando.upstream.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-# This file sets some good defaults for local development using this Platform.sh
-# template with Lando.
-#
-# Note that you should not edit this file so it can continue to receive upstream
-# updates. If you wish to change the values below then override them in your
-# normal .lando.yml.
-
-# These both allow you to test this template without needing a site on Platform.sh
-# However you will want to replace them in your .lando.yml
-name: platformsh-drupal10
-recipe: platformsh
-
-config:
-
- # This section overrides Platform.sh configuration with values that make more
- # sense for local development.
- #
- # Note that "app" is the name of the application defined in your
- # .platform.app.yaml or applications.yaml.
- overrides:
- app:
- variables:
- drupalconfig:
- "system.file:path:temporary": "/tmp"
- drupalsettings:
- "skip_permissions_hardening": 1
-
-
-# These are tools that are commonly used during development for this template.
-tooling:
- drush:
- service: app
diff --git a/templates/drupal10/files/README.md b/templates/drupal10/files/README.md
deleted file mode 100644
index a87ed5883..000000000
--- a/templates/drupal10/files/README.md
+++ /dev/null
@@ -1,832 +0,0 @@
-
-
-Contribute, request a feature, or check out our resources
-
-
-Join our community      
-Documentation      
-Blog      
-Report a bug      
-Request a feature
-
-
-
-## 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.1
-- MariaDB 10.4
-- Redis 6
-- 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/drupal10 -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/drupal10
-```
-
-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/drupal10/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/drupal10.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 `drupal10` 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. A configuration file has already been provided at `.ddev/providers/platform.yaml`, so you should not need to 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 drupal10 && cd drupal10
-$ 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!
-
-
-
-
diff --git a/templates/drupal10/files/config/sync/.gitkeep b/templates/drupal10/files/config/sync/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/drupal10/files/drush/platformsh_deploy_drupal.sh b/templates/drupal10/files/drush/platformsh_deploy_drupal.sh
deleted file mode 100755
index dee7f35e1..000000000
--- a/templates/drupal10/files/drush/platformsh_deploy_drupal.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/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 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/drupal10/files/drush/platformsh_generate_drush_yml.php b/templates/drupal10/files/drush/platformsh_generate_drush_yml.php
deleted file mode 100644
index 9dbb98c17..000000000
--- a/templates/drupal10/files/drush/platformsh_generate_drush_yml.php
+++ /dev/null
@@ -1,80 +0,0 @@
-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/drupal10/files/php.ini b/templates/drupal10/files/php.ini
deleted file mode 100644
index b731f3112..000000000
--- a/templates/drupal10/files/php.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-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/drupal10/files/web/sites/default/settings.php b/templates/drupal10/files/web/sites/default/settings.php
deleted file mode 100644
index d757bfacd..000000000
--- a/templates/drupal10/files/web/sites/default/settings.php
+++ /dev/null
@@ -1,43 +0,0 @@
-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->branch == 'master' || $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/drupal9-govcms9/files/.blackfire.yml b/templates/drupal9-govcms9/files/.blackfire.yml
deleted file mode 100644
index 78f90ecd4..000000000
--- a/templates/drupal9-govcms9/files/.blackfire.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-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/drupal9-govcms9/files/.ddev/config.yml b/templates/drupal9-govcms9/files/.ddev/config.yml
deleted file mode 100644
index 11dc0d1d6..000000000
--- a/templates/drupal9-govcms9/files/.ddev/config.yml
+++ /dev/null
@@ -1,199 +0,0 @@
-type: drupal9
-docroot: web
-database:
- type: mariadb
- version: "10.4"
-mutagen_enabled: false
-use_dns_when_possible: true
-composer_version: "2"
-web_environment: []
-php_version: "8.0"
-nodejs_version: "16"
-
-# Key features of ddev's config.yaml:
-
-# name: # Name of the project, automatically provides
-# http://projectname.ddev.site and https://projectname.ddev.site
-
-# type: # drupal6/7/8, backdrop, typo3, wordpress, php
-
-# docroot: # Relative path to the directory containing index.php.
-
-# php_version: "7.4" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"
-
-# You can explicitly specify the webimage but this
-# is not recommended, as the images are often closely tied to ddev's' behavior,
-# so this can break upgrades.
-
-# webimage: # nginx/php docker image.
-
-# database:
-# type: # mysql, mariadb
-# version: # database version, like "10.3" or "8.0"
-# Note that mariadb_version or mysql_version from v1.18 and earlier
-# will automatically be converted to this notation with just a "ddev config --auto"
-
-# router_http_port: # Port to be used for http (defaults to port 80)
-# router_https_port: # Port for https (defaults to 443)
-
-# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart"
-# Note that for most people the commands
-# "ddev xdebug" to enable xdebug and "ddev xdebug off" to disable it work better,
-# as leaving xdebug enabled all the time is a big performance hit.
-
-# xhprof_enabled: false # Set to true to enable xhprof and "ddev start" or "ddev restart"
-# Note that for most people the commands
-# "ddev xhprof" to enable xhprof and "ddev xhprof off" to disable it work better,
-# as leaving xhprof enabled all the time is a big performance hit.
-
-# webserver_type: nginx-fpm # or apache-fpm
-
-# timezone: Europe/Berlin
-# This is the timezone used in the containers and by PHP;
-# it can be set to any valid timezone,
-# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
-# For example Europe/Dublin or MST7MDT
-
-# composer_root:
-# Relative path to the composer root directory from the project root. This is
-# the directory which contains the composer.json and where all Composer related
-# commands are executed.
-
-# composer_version: "2"
-# if composer_version:"2" it will use the most recent composer v2
-# It can also be set to "1", to get most recent composer v1
-# or "" for the default v2 created at release time.
-# It can be set to any existing specific composer version.
-# After first project 'ddev start' this will not be updated until it changes
-
-# nodejs_version: "16"
-# change from the default system Node.js version to another supported version, like 12, 14, 17.
-# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any
-# Node.js version, including v6, etc.
-
-# additional_hostnames:
-# - somename
-# - someothername
-# would provide http and https URLs for "somename.ddev.site"
-# and "someothername.ddev.site".
-
-# additional_fqdns:
-# - example.com
-# - sub1.example.com
-# would provide http and https URLs for "example.com" and "sub1.example.com"
-# Please take care with this because it can cause great confusion.
-
-# upload_dir: custom/upload/dir
-# would set the destination path for ddev import-files to /custom/upload/dir
-
-# working_dir:
-# web: /var/www/html
-# db: /home
-# would set the default working directory for the web and db services.
-# These values specify the destination directory for ddev ssh and the
-# directory in which commands passed into ddev exec are run.
-
-# omit_containers: [db, dba, ddev-ssh-agent]
-# Currently only these containers are supported. Some containers can also be
-# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
-# the "db" container, several standard features of ddev that access the
-# database container will be unusable. In the global configuration it is also
-# possible to omit ddev-router, but not here.
-
-# nfs_mount_enabled: false
-# Great performance improvement but requires host configuration first.
-# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container
-
-# mutagen_enabled: false
-# Experimental performance improvement using mutagen asynchronous updates.
-# See https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen
-
-# fail_on_hook_fail: False
-# Decide whether 'ddev start' should be interrupted by a failing hook
-
-# host_https_port: "59002"
-# The host port binding for https can be explicitly specified. It is
-# dynamic unless otherwise specified.
-# This is not used by most people, most people use the *router* instead
-# of the localhost port.
-
-# host_webserver_port: "59001"
-# The host port binding for the ddev-webserver can be explicitly specified. It is
-# dynamic unless otherwise specified.
-# This is not used by most people, most people use the *router* instead
-# of the localhost port.
-
-# host_db_port: "59002"
-# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
-# unless explicitly specified.
-
-# phpmyadmin_port: "8036"
-# phpmyadmin_https_port: "8037"
-# The PHPMyAdmin ports can be changed from the default 8036 and 8037
-
-# host_phpmyadmin_port: "8036"
-# The phpmyadmin (dba) port is not normally bound on the host at all, instead being routed
-# through ddev-router, but it can be specified and bound.
-
-# mailhog_port: "8025"
-# mailhog_https_port: "8026"
-# The MailHog ports can be changed from the default 8025 and 8026
-
-# host_mailhog_port: "8025"
-# The mailhog port is not normally bound on the host at all, instead being routed
-# through ddev-router, but it can be bound directly to localhost if specified here.
-
-# webimage_extra_packages: [php7.4-tidy, php-bcmath]
-# Extra Debian packages that are needed in the webimage can be added here
-
-# dbimage_extra_packages: [telnet,netcat]
-# Extra Debian packages that are needed in the dbimage can be added here
-
-# use_dns_when_possible: true
-# If the host has internet access and the domain configured can
-# successfully be looked up, DNS will be used for hostname resolution
-# instead of editing /etc/hosts
-# Defaults to true
-
-# project_tld: ddev.site
-# The top-level domain used for project URLs
-# The default "ddev.site" allows DNS lookup via a wildcard
-# If you prefer you can change this to "ddev.local" to preserve
-# pre-v1.9 behavior.
-
-# ngrok_args: --subdomain mysite --auth username:pass
-# Provide extra flags to the "ngrok http" command, see
-# https://ngrok.com/docs#http or run "ngrok http -h"
-
-# disable_settings_management: false
-# If true, ddev will not create CMS-specific settings files like
-# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
-# In this case the user must provide all such settings.
-
-# You can inject environment variables into the web container with:
-# web_environment:
-# - SOMEENV=somevalue
-# - SOMEOTHERENV=someothervalue
-
-# no_project_mount: false
-# (Experimental) If true, ddev will not mount the project into the web container;
-# the user is responsible for mounting it manually or via a script.
-# This is to enable experimentation with alternate file mounting strategies.
-# For advanced users only!
-
-# bind_all_interfaces: false
-# If true, host ports will be bound on all network interfaces,
-# not just the localhost interface. This means that ports
-# will be available on the local network if the host firewall
-# allows it.
-
-# Many ddev commands can be extended to run tasks before or after the
-# ddev command is executed, for example "post-start", "post-import-db",
-# "pre-composer", "post-composer"
-# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
-# information on the commands that can be extended and the tasks you can define
-# for them. Example:
-#hooks:
-# post-import-db:
-# - exec: drush cr
-# - exec: drush updb
diff --git a/templates/drupal9-govcms9/files/.editorconfig b/templates/drupal9-govcms9/files/.editorconfig
deleted file mode 100644
index 686c443ce..000000000
--- a/templates/drupal9-govcms9/files/.editorconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-# Drupal editor configuration normalization
-# @see http://editorconfig.org/
-
-# This is the top-most .editorconfig file; do not search in parent directories.
-root = true
-
-# All files.
-[*]
-end_of_line = LF
-indent_style = space
-indent_size = 2
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[composer.{json,lock}]
-indent_size = 4
diff --git a/templates/drupal9-govcms9/files/.environment b/templates/drupal9-govcms9/files/.environment
deleted file mode 100644
index 3e0014164..000000000
--- a/templates/drupal9-govcms9/files/.environment
+++ /dev/null
@@ -1,11 +0,0 @@
-# Statements in this file will be executed (sourced) by the shell in SSH
-# sessions, in deploy hooks, in cron jobs, and in the application's runtime
-# environment. This file must be placed in the root of the application, not
-# necessarily the git repository's root. In case of multiple applications,
-# each application can have its own .environment file.
-
-# Allow executable app dependencies from Composer to be run from the path.
-if [ -n "$PLATFORM_APP_DIR" -a -f "$PLATFORM_APP_DIR"/composer.json ] ; then
- bin=$(composer config bin-dir --working-dir="$PLATFORM_APP_DIR" --no-interaction 2>/dev/null)
- export PATH="${PLATFORM_APP_DIR}/${bin:-vendor/bin}:${PATH}"
-fi
diff --git a/templates/drupal9-govcms9/files/.gitattributes b/templates/drupal9-govcms9/files/.gitattributes
deleted file mode 100644
index a37894e8e..000000000
--- a/templates/drupal9-govcms9/files/.gitattributes
+++ /dev/null
@@ -1,61 +0,0 @@
-# Drupal git normalization
-# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
-# @see https://www.drupal.org/node/1542048
-
-# Normally these settings would be done with macro attributes for improved
-# readability and easier maintenance. However macros can only be defined at the
-# repository root directory. Drupal avoids making any assumptions about where it
-# is installed.
-
-# Define text file attributes.
-# - Treat them as text.
-# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
-# - Detect whitespace errors.
-# - Exposed by default in `git diff --color` on the CLI.
-# - Validate with `git diff --check`.
-# - Deny applying with `git apply --whitespace=error-all`.
-# - Fix automatically with `git apply --whitespace=fix`.
-
-*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
-*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
-*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
-
-# Define binary file attributes.
-# - Do not treat them as text.
-# - Include binary diff in patches instead of "binary files differ."
-*.eot -text diff
-*.exe -text diff
-*.gif -text diff
-*.gz -text diff
-*.ico -text diff
-*.jpeg -text diff
-*.jpg -text diff
-*.otf -text diff
-*.phar -text diff
-*.png -text diff
-*.svgz -text diff
-*.ttf -text diff
-*.woff -text diff
-*.woff2 -text diff
diff --git a/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/bug_report.yaml b/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/bug_report.yaml
deleted file mode 100644
index 8b8fb71ce..000000000
--- a/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
-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
diff --git a/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/config.yaml b/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/config.yaml
deleted file mode 100644
index 6391f6f4d..000000000
--- a/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-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/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/improvements.yaml b/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/improvements.yaml
deleted file mode 100644
index 10c727e7c..000000000
--- a/templates/drupal9-govcms9/files/.github/ISSUE_TEMPLATE/improvements.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-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/drupal9-govcms9/files/.github/PULL_REQUEST_TEMPLATE.md b/templates/drupal9-govcms9/files/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index b41bea1c8..000000000
--- a/templates/drupal9-govcms9/files/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## 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/drupal9-govcms9/files/.gitignore b/templates/drupal9-govcms9/files/.gitignore
deleted file mode 100644
index 6b6444a2c..000000000
--- a/templates/drupal9-govcms9/files/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
diff --git a/templates/drupal9-govcms9/files/.lando.upstream.yml b/templates/drupal9-govcms9/files/.lando.upstream.yml
deleted file mode 100644
index 73aeee939..000000000
--- a/templates/drupal9-govcms9/files/.lando.upstream.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-# This file sets some good defaults for local development using this Platform.sh
-# template with Lando.
-#
-# Note that you should not edit this file so it can continue to receive upstream
-# updates. If you wish to change the values below then override them in your
-# normal .lando.yml.
-
-# These both allow you to test this template without needing a site on Platform.sh
-# However you will want to replace them in your .lando.yml
-name: platformsh-govcms9
-recipe: platformsh
-
-config:
-
- # This section overrides Platform.sh configuration with values that make more
- # sense for local development.
- #
- # Note that "app" is the name of the application defined in your
- # .platform.app.yaml or applications.yaml.
- overrides:
- app:
- variables:
- drupalconfig:
- "system.file:path:temporary": "/tmp"
- drupalsettings:
- "skip_permissions_hardening": 1
-
-
-# These are tools that are commonly used during development for this template.
-tooling:
- drush:
- service: app
diff --git a/templates/drupal9-govcms9/files/.platform.app.yaml b/templates/drupal9-govcms9/files/.platform.app.yaml
index 88e352a2e..caac57dd1 100644
--- a/templates/drupal9-govcms9/files/.platform.app.yaml
+++ b/templates/drupal9-govcms9/files/.platform.app.yaml
@@ -1,39 +1,29 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/configuration/app.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# 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.
-type: 'php:8.0'
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: 'php:8.1'
-dependencies:
- php:
- composer/composer: '^2'
-
-runtime:
- # Enable the redis extension so Drupal can communicate with the Redis cache.
- extensions:
- - redis
- - sodium
- - apcu
- - blackfire
+# size: <-- not needed for this template
# 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).
+# 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 define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
# The default Drupal files directory.
'/web/sites/default/files':
@@ -64,37 +54,15 @@ mounts:
source: local
source_path: 'console'
-# Configuration of the build of this application.
-build:
- flavor: composer
-
-# The hooks executed at various points in the lifecycle of the application.
-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`
- bash $PLATFORM_APP_DIR/drush/platformsh_deploy_drupal.sh
-
-# The configuration of app when it is exposed to the web.
+# 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:
+ # 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.
+ # The public directory of the app, relative to its root.
root: 'web'
# How long to allow static assets from this location to be cached.
@@ -105,13 +73,16 @@ web:
# 365 days).
expires: 5m
- # Redirect any incoming request to Drupal's front controller.
+ # The front-controller script to send non-static requests to.
passthru: '/index.php'
# Deny access to all static files, except those specifically allowed below.
allow: false
- # Rules for specific URI patterns.
+ # The key of each item in rules is a regular expression to match paths exactly. If an incoming request
+ # matches the rule, it’s handled by the properties under the rule, overriding any conflicting rules from the
+ # rest of the locations properties.
+ # More information: https://docs.platform.sh/create-apps/app-reference.html#rules
rules:
# Allow access to common static files.
'\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf)$':
@@ -143,6 +114,45 @@ web:
'^/sites/default/files/(css|js)':
expires: 2w
+# workers: <-- not needed for this template
+# timezone: <-- not needed for this template
+# access: <-- not needed for this template
+# variables: <-- not needed for this template
+# firewall: <-- not needed for this template
+
+# 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
+build:
+ flavor: composer
+
+# 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'
+
+# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
+# More info:
+hooks:
+ # The build hook is run after any build flavor. No services are available but the disk is writeable.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -e
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # 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.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ 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`
+ bash $PLATFORM_APP_DIR/drush/platformsh_deploy_drupal.sh
+
crons:
# Run Drupal's cron tasks every 19 minutes.
drupal:
@@ -150,6 +160,23 @@ crons:
commands:
start: 'cd web ; drush core-cron'
+runtime:
+ # Enable the redis extension so Drupal can communicate with the Redis cache.
+ extensions:
+ - redis
+ - sodium
+ - apcu
+ - blackfire
+
+########################################################################################################################
+## ##
+## This source operation is part of the Platform.sh process of updating and maintaining our collection of templates. ##
+## For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+## https://github.com/platformsh/source-operations ##
+## ##
+## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+## ##
+########################################################################################################################
source:
operations:
auto-update:
diff --git a/templates/drupal9-govcms9/files/README-govcms.md b/templates/drupal9-govcms9/files/README-govcms.md
deleted file mode 100644
index 495e753e6..000000000
--- a/templates/drupal9-govcms9/files/README-govcms.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# GovCMS
-
-## About GovCMS
-
-
-
-GovCMS is the Drupal specific version of the GovCMS distribution.
-
-[GovCMS](https://www.govcms.gov.au) is an open source web content management and hosting service, based on Drupal and developed to help agencies create modern, affordable and responsive websites, whilst making it easier to collaborate and innovate. GovCMS also helps reduce the technology and compliance burden on government agencies. GovCMS is managed by the Australian Government Department of Finance.
-
-GovCMS9 Slack channel: https://govcmschat.slack.com/archives/C01BD9B3V5W
-
----
-
-## Installation
-
-_For an easy, one-line, dev setup see ['Automated Default Dev Setup' wiki page](https://github.com/GovCMS/GovCMS/wiki/Automated-Default-Dev-Setup)._
-
-GovCMS utilizes [Composer](https://getcomposer.org/) to manage its dependencies. So, before using GovCMS, make sure you have Composer installed on your machine.
-
-For best performance with composer 1.x, we recommend adding [Prestissimo](https://github.com/hirak/prestissimo) to your global Composer before installing GovCMS, as it enables dependencies to load in parallel, significantly reducing the install time.
-
- composer global require "hirak/prestissimo:^0.3"
-
-### Via Composer Create-Project
-
-Composer will create a new directory called MY_PROJECT containing a docroot directory with a full GovCMS code base therein.
-
- composer create-project --stability dev --prefer-dist govcms/govcms-project MY_PROJECT
-
-[Composer create-project](https://getcomposer.org/doc/03-cli.md#create-project) is the same as doing a git clone, followed by a composer install.
-
-### Installation from source
-
- git clone -b 2.x-develop git@github.com:GovCMS/GovCMS.git
- cd GovCMS
- composer install
-
-To develop on or patch against GovCMS, the source files should be downloaded and the project built.
-
-### Other Platforms
-
-Additional platform instructions are available in the wiki (https://github.com/GovCMS/GovCMS/wiki). If you can contribute more methods, please let us know.
-
-**[Back to top](#govcms)**
-
-## Server Requirements
-
-* Apache, Nginx, Microsoft IIS or any other web server with proper PHP support
-* MySQL 5.7.8+/MariaDB 10.3.7+/Percona Server 5.7.8+ or higher with PDO and an InnoDB-compatible primary storage engine
-* PostgreSQL 10 or higher with the pg_trgm extension.
-* SQLite 3.7.11 or higher
-* PHP Version 7.4.* or higher
-* [Git](http://git-scm.com/)
-* [Composer](https://getcomposer.org/)
-
-**[Back to top](#govcms)**
-
-## Troubleshooting and Contributing
-
-If you're encountering some oddities, [here's a list of resolutions](https://github.com/GovCMS/GovCMS/wiki/Troubleshooting) to some of the problems you may be experiencing.
-
-### Contributing to GovCMS
-
-All contributions to GovCMS are welcome. Issues and pull requests may be submitted against the relevant GovCMS project on github where they will be addressed by the GovCMS team.
-
-### Patching GovCMS
-
-Because GovCMS is a [Drupal distribution](https://www.drupal.org/documentation/build/distributions), modules and configurations are not added directly to the codebase. Rather, they are referenced within the composer.json file.
-
-Any alterations to Drupal core or contributed modules must have an associated [drupal.org](https://www.drupal.org) issue filed against the project in question. Modifications should be made directly to the project in question and patched into GovCMS rather than made directly against GovCMS.
-
-It is a requirement for any patches to GovCMS to pass all automated testing prior to manual review. The automated testing checks for PHP syntax, coding standards, build completion and runs behavioural tests. It is also desirable that additions to the codebase add behat tests to ensure no regressions occur once committed.
-
-To submit a patch, the GovCMS project should be forked and changes applied to a branch on the forked repository. Once all changes are applied, a pull request between GovCMS and the branch of the fork may be created.
-
-**[Back to top](#govcms)**
diff --git a/templates/drupal9-govcms9/files/README-platformsh.md b/templates/drupal9-govcms9/files/README-platformsh.md
deleted file mode 100644
index cd6f46864..000000000
--- a/templates/drupal9-govcms9/files/README-platformsh.md
+++ /dev/null
@@ -1,736 +0,0 @@
-
-
-Contribute, request a feature, or check out our resources
-
-
-Join our community      
-Documentation      
-Blog      
-Report a bug      
-Request a feature
-
-
-
-## About
-
-This template builds Drupal 9 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.0
-- MariaDB 10.4
-- Redis 6
-- 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/drupal9 -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/drupal9
-```
-
-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/drupal9/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/drupal9.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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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 `drupal9` 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. A configuration file has already been provided at `.ddev/providers/platform.yaml`, so you should not need to 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 drupal9 && cd drupal9
-$ 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 9.3.9
-
-```
-
-
-
-### 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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/9.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!
-
-
-
-
-
-
-## About Drupal 9 on Platform.sh
-
-This template builds Drupal using the "GovCMS" distribution install profile.
-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.
-
-> You should choose the "GovCMS" install profile when prompted to by the install wizard during initial setup.
-
-### Features
-
-- PHP 8.0
-- MariaDB 10.4
-- Redis 6
-- Drush included
-- Automatic TLS certificates
-- Composer-based build
-
-Please see [`platformsh-templates/drupal9:README.md`](https://github.com/platformsh-templates/drupal9/blob/master/README.md) for a full introduction to getting started and using the Platform.sh system, including:
-
-* Deployment
-* Local Development
-* Migration
-* Troubleshooting
-
-## About GovCMS
-
-[GovCMS](https://www.govcms.gov.au) is an open source web content management and hosting service, based on Drupal and developed to help agencies create modern, affordable and responsive websites, whilst making it easier to collaborate and innovate. GovCMS also helps reduce the technology and compliance burden on government agencies. GovCMS is managed by the Australian Government Department of Finance.
-
-GovCMS9 Slack channel: https://govcmschat.slack.com/archives/C01BD9B3V5W
-
-Please see [`govCMS/GovCMS:README.md`](https://github.com/https://github.com/govCMS/GovCMS/blob/2.x-develop/README.md/blob/2.x-develop/README.md) for a full introduction to the GovCMS project, including:
-
-* Installation
-* Troubleshooting and Contributing
-
-> The GovCMS distribution is a deliberately restricted and curated set of modules, and you are advised to read [the guidelines for usage and development published by the maintainers](https://www.govcms.gov.au/support/tech-talk) before modifying things too much.
-
-## 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/drupal9-govcms9 -s dev
-```
-
-## About this template
-
-This project template is based on [the public Platform.sh Drupal9 template](https://github.com/platformsh-templates/drupal9/tree/0a0257ddc427d7b7f7d87fb85fdb64604d5556b9) from [the Platform.sh template library](https://docs.platform.sh/development/templates.html).
-See the [Platform.sh documentation for deploying Drupal 9](https://docs.platform.sh/guides/drupal9/deploy.html) for more.
-
-This template has been modified slightly, with reference to [the `govCMS/GovCMS-project` installer](https://github.com/govCMS/GovCMS8-project) to add a few requirements to the `composer` configurations to suit the GovCMS installation.
-
-### Upgrading
-
-#### Upgrading GovCMS and Drupal
-
-The template requires the Drupal distribution `govcms/govcms: ~2` which at the time of release (v 2.23.0) means Drupal 9 (v 9.4.7).
-
-Running `composer upgrade` should be sufficient to keep your project up to date with newer releases to both GovCMS and Drupal core, as well as security releases.
-It is not advised to require or define the Drupal core version yourself, the GovCMS template will pin the latest compatible Drupal version itself.
-
-#### Upgrading Platform.sh configurations
-
-You are expected to review and modify this template code (`.platformsh.app.yaml` etc) to your specific application requirements [as described in the documentation](https://docs.platform.sh/create-apps/app-reference.html), so it's normal to use the template only as a reference once you've started building your app.
-
-Over time, there may be minor updates added to the base Platform.sh Drupal template.
-Although it's seldom neccessary, you can follow the updates from the repository [starting from this commit date](https://github.com/platformsh-templates/drupal9/tree/0a0257ddc427d7b7f7d87fb85fdb64604d5556b9)
-Patches like this should be applied manually as your own configuration is expected to diverge from the template as you develop.
-
-
-
-
diff --git a/templates/drupal9-govcms9/files/config/sync/.gitkeep b/templates/drupal9-govcms9/files/config/sync/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/drupal9-govcms9/files/config/sync/.htaccess b/templates/drupal9-govcms9/files/config/sync/.htaccess
deleted file mode 100644
index 553df559f..000000000
--- a/templates/drupal9-govcms9/files/config/sync/.htaccess
+++ /dev/null
@@ -1,27 +0,0 @@
-# Deny all requests from Apache 2.4+.
-
- Require all denied
-
-
-# Deny all requests from Apache 2.0-2.2.
-
- Deny from all
-
-
-# Turn off all options we don't need.
-Options -Indexes -ExecCGI -Includes -MultiViews
-
-# Set the catch-all handler to prevent scripts from being executed.
-SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
-
- # Override the handler again if we're run later in the evaluation list.
- SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
-
-
-# If we know how to do it safely, disable the PHP engine entirely.
-
- php_flag engine off
-
-
- php_flag engine off
-
diff --git a/templates/drupal9-govcms9/files/docroot/sites/default/settings.php b/templates/drupal9-govcms9/files/docroot/sites/default/settings.php
deleted file mode 100644
index 6cd54fb17..000000000
--- a/templates/drupal9-govcms9/files/docroot/sites/default/settings.php
+++ /dev/null
@@ -1,162 +0,0 @@
-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'])]
- ];
-}
-
-// 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->branch == 'master' || $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/drupal9-govcms9/files/docroot/sites/default/settings.platformsh.php b/templates/drupal9-govcms9/files/docroot/sites/default/settings.platformsh.php
deleted file mode 100644
index 62c9cbd5b..000000000
--- a/templates/drupal9-govcms9/files/docroot/sites/default/settings.platformsh.php
+++ /dev/null
@@ -1,162 +0,0 @@
-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'])]
- ];
-}
-
-// 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->branch == 'master' || $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 'd8settings:' into $settings
-// and 'd8config:' 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 `d8settings` or `drupal` get mapped
- // to the $settings array verbatim, even if the value is an array.
- // For example, a variable named d8settings:example-setting' with
- // value 'foo' becomes $settings['example-setting'] = 'foo';
- case 'd8settings':
- case 'drupal':
- $settings[$key] = $value;
- break;
- // Variables that begin with `d8config` 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 `d8config:conf_file:prop` with value `foo` becomes
- // $config['conf_file']['prop'] = 'foo';
- // Example: Variable `d8config:conf_file:prop:subprop` with value `foo` becomes
- // $config['conf_file']['prop']['subprop'] = 'foo';
- // Example: Variable `d8config:conf_file:prop:subprop` with value ['foo' => 'bar'] becomes
- // $config['conf_file']['prop']['subprop']['foo'] = 'bar';
- // Example: Variable `d8config:prop` is ignored.
- case 'd8config':
- 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/drupal9-govcms9/files/drush/platformsh_deploy_drupal.sh b/templates/drupal9-govcms9/files/drush/platformsh_deploy_drupal.sh
deleted file mode 100644
index dee7f35e1..000000000
--- a/templates/drupal9-govcms9/files/drush/platformsh_deploy_drupal.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/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 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/drupal9-govcms9/files/drush/platformsh_generate_drush_yml.php b/templates/drupal9-govcms9/files/drush/platformsh_generate_drush_yml.php
deleted file mode 100644
index 9dbb98c17..000000000
--- a/templates/drupal9-govcms9/files/drush/platformsh_generate_drush_yml.php
+++ /dev/null
@@ -1,80 +0,0 @@
-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/drupal9-govcms9/files/header.svg b/templates/drupal9-govcms9/files/header.svg
deleted file mode 100644
index 1370820af..000000000
--- a/templates/drupal9-govcms9/files/header.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/templates/drupal9-govcms9/files/patches/govcms-prevent-autoinstall.patch b/templates/drupal9-govcms9/files/patches/govcms-prevent-autoinstall.patch
deleted file mode 100644
index 66d4bc7e8..000000000
--- a/templates/drupal9-govcms9/files/patches/govcms-prevent-autoinstall.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git govcms.info.yml govcms.info.yml
-index cd64926..2f080d1 100644
---- govcms.info.yml
-+++ govcms.info.yml
-@@ -5,10 +5,6 @@ project: govcms
- core_version_requirement: ^9
- version: '2.23.0'
-
--distribution:
-- name: GovCMS
-- langcode: en
--
- install:
- - big_pipe
- - ckeditor
diff --git a/templates/drupal9-govcms9/files/php.ini b/templates/drupal9-govcms9/files/php.ini
deleted file mode 100644
index b731f3112..000000000
--- a/templates/drupal9-govcms9/files/php.ini
+++ /dev/null
@@ -1,14 +0,0 @@
-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/drupal9-govcms9/files/platformsh_deploy_drush.sh b/templates/drupal9-govcms9/files/platformsh_deploy_drush.sh
deleted file mode 100644
index dee7f35e1..000000000
--- a/templates/drupal9-govcms9/files/platformsh_deploy_drush.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/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 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/drupal9-multisite/files/.editorconfig b/templates/drupal9-multisite/files/.editorconfig
deleted file mode 100644
index 76b0d7c09..000000000
--- a/templates/drupal9-multisite/files/.editorconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-# Drupal editor configuration normalization
-# @see http://editorconfig.org/
-
-# This is the top-most .editorconfig file; do not search in parent directories.
-root = true
-
-# All files.
-[*]
-end_of_line = LF
-indent_style = space
-indent_size = 2
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[composer.{json,lock}]
-indent_size = 4
-
-[.platform.app.yaml]
-indent_size = 4
diff --git a/templates/drupal9-multisite/files/.environment b/templates/drupal9-multisite/files/.environment
deleted file mode 100644
index 3e0014164..000000000
--- a/templates/drupal9-multisite/files/.environment
+++ /dev/null
@@ -1,11 +0,0 @@
-# Statements in this file will be executed (sourced) by the shell in SSH
-# sessions, in deploy hooks, in cron jobs, and in the application's runtime
-# environment. This file must be placed in the root of the application, not
-# necessarily the git repository's root. In case of multiple applications,
-# each application can have its own .environment file.
-
-# Allow executable app dependencies from Composer to be run from the path.
-if [ -n "$PLATFORM_APP_DIR" -a -f "$PLATFORM_APP_DIR"/composer.json ] ; then
- bin=$(composer config bin-dir --working-dir="$PLATFORM_APP_DIR" --no-interaction 2>/dev/null)
- export PATH="${PLATFORM_APP_DIR}/${bin:-vendor/bin}:${PATH}"
-fi
diff --git a/templates/drupal9-multisite/files/.gitignore b/templates/drupal9-multisite/files/.gitignore
deleted file mode 100644
index 2713229f9..000000000
--- a/templates/drupal9-multisite/files/.gitignore
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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/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/files
-tmp
-private
-.drush
-drush-backups
-.console
diff --git a/templates/drupal9-multisite/files/.lando.upstream.yml b/templates/drupal9-multisite/files/.lando.upstream.yml
deleted file mode 100644
index 12d39945e..000000000
--- a/templates/drupal9-multisite/files/.lando.upstream.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# This file sets some good defaults for local development using this Platform.sh
-# template with Lando.
-#
-# Note that you should not edit this file so it can continue to receive upstream
-# updates. If you wish to change the values below then override them in your
-# normal .lando.yml.
-
-# These both allow you to test this template without needing a site on Platform.sh
-# However you will want to replace them in your .lando.yml
-name: platformsh-drupal9-multisite
-recipe: platformsh
-
-config:
-
- # This section overrides Platform.sh configuration with values that make more
- # sense for local development.
- #
- # Note that "app" is the name of the application defined in your
- # .platform.app.yaml or applications.yaml.
- overrides:
- app:
- variables:
- drupalconfig:
- "system.file:path:temporary": "/tmp"
- drupalsettings:
- "skip_permissions_hardening": 1
-
-
-# These are tools that are commonly used during development for this template.
-tooling:
- drush:
- service: app
- drupal:
- service: app
diff --git a/templates/drupal9-multisite/files/.platform.app.yaml b/templates/drupal9-multisite/files/.platform.app.yaml
index 848777a53..c4c18cf17 100644
--- a/templates/drupal9-multisite/files/.platform.app.yaml
+++ b/templates/drupal9-multisite/files/.platform.app.yaml
@@ -7,7 +7,7 @@
name: 'drupal'
# The runtime the application uses.
-type: 'php:8.0'
+type: 'php:8.1'
dependencies:
php:
@@ -150,7 +150,8 @@ crons:
# Run Drupal's cron tasks every 19 minutes.
drupal:
spec: '*/19 * * * *'
- commands: 'cd web ; drush core-cron'
+ commands:
+ start: 'cd web ; drush core-cron'
source:
operations:
diff --git a/templates/drupal9-multisite/files/README.md b/templates/drupal9-multisite/files/README.md
deleted file mode 100644
index d9e301fb5..000000000
--- a/templates/drupal9-multisite/files/README.md
+++ /dev/null
@@ -1,804 +0,0 @@
-
-
-Contribute, request a feature, or check out our resources
-
-
-Join our community      
-Documentation      
-Blog      
-Report a bug      
-Request a feature
-
-
-
-## About
-
-This template builds Drupal 9 in a multisite configuration using the "Drupal Recommended" Composer project, creating three subsite installations from the same codebase.
-
-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.
-
-It also includes instructions and a script to help with setting up additional multisite instances, although depending on your particular needs it may require some customization.
-
-Drupal is a flexible and extensible PHP-based CMS framework capable of hosting multiple sites on a single code base.
-
-### Features
-
-- PHP 8.0
-- MariaDB 10.4
-- Redis 6
-- Drush included
-- Pre-configured for multiple sites
-- 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/drupal9-multisite -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/drupal9-multisite
-```
-
-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/drupal9-multisite/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/drupal9-multisite.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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
-Each subsite installs separately. As configured, this project uses a subdomain for each subsite. For each subsite, 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 `drupal9-multisite` 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. A configuration file has already been provided at `.ddev/providers/platform.yaml`, so you should not need to 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 drupal9-multisite && cd drupal9-multisite
-$ 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 9.3.9
-
-```
-
-
-
-### 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 |
-|:-----------|:--------|
-| [`psh-subsite-add.php`](psh-subsite-add.php) | **Added:**
A script has been added to simplify adding additional sites to your Drupal installation. See [Adding a new subsite](#troubleshooting) for more information. |
-| [`web/sites/sites.php`](web/sites/sites.php) | **Added:**
Configuration file for multi-site support and directory aliasing feature. |
-| [`web/sites/default/settings.php`](web/sites/default/settings.php) | **Added:**
The Drupal settings file has been updated to import and use `web/sites/settings.platformsh.php`. You will also need an identical file for each subsite (i.e. `main`, `first`, and `second`). |
-| [`web/sites/default/services.yml`](web/sites/default/services.yml) | **Added:**
Default services configuration. You will also need an identical file for each subsite (i.e. `main`, `first`, and `second`). |
-| [`web/sites/default/drushrc.php`](web/sites/default/drushrc.php) | **Added:**
Drush configuration file for a Platform.sh Drupal site. You will also need an identical file for each subsite (i.e. `main`, `first`, and `second`). |
-| [`web/sites/settings.platformsh.php`](web/sites/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. |
-| [`.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. |
-| [`.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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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 (using [Homebrew](https://brew.sh/))
-
- ```bash
- $ brew install platformsh/tap/platformsh-cli
- ```
-
- #### Windows (using [Scoop](https://scoop.sh/))
-
- ```bash
- $ scoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git
- $ scoop install platform
- ```
-
- 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/9.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.
-
-
-
-
-How Drupal multi-site works on Platform.sh
-
-Multisite on Platform.sh can be tricky. Drupal multisite bases its logic off of the domain name of the incoming request. However, the domain name of the request is by design highly variable on Platform.sh as every environment has a unique domain. As a result, this template establishes a number of conventions and custom configuration to make multi-site work.
-
-* Every subsite is a subdomain off of a common domain. See `routes.yaml`. The domain prefix is the "subsite ID".
-* Every subsite has its own database and endpoint on a single MariaDB service instance. The endpoint name is the same as the subsite ID.
-* The `sites/sites.php` file includes code to build a `$sites` lookup list to map any incoming request, regardless of branch, to a settings directory named for the subsite ID. It iterates over all routes that point to the Drupal application and parses those routes into a domain name -> directory list, where the directory is the site ID. If you are not using a subdomain based multi-site you will likely need to modify the body of the `foreach()` loop.
-* The `.platform.app.yaml` file is essentially the same as for a single-site Drupal installation, but its relationships include every defined MariaDB endpoint. The relationship is also named for the subsite ID.
-* Every subsite ID's `settings.php` file is identical, and largely similar to the standard Platform.sh `settings.php` file. You may customize it if needed. In particular, the `$platformsh_enable_redis` variable should be toggled to `true` for each site only after the install process is completed for that site, as Drupal cannot install with the redis module active.
-* The `settings.php` files also include a shared `sites/settings.platformsh.php` file. It is largely the same as in a single-site configuration but has been modified to leverage the subsite ID for:
- * Selecting which database relationship to use
- * Including a cache prefix in Redis so that each site has its own effective cache pool.
- * Setting the files and private files directories, which are subsite ID prefixes of top-level `files` and `private` directories rather than under each site directory.
-
-
-
-
-Adding a new subsite
-
-Adding a new subsite requires the following steps. For these steps, assume we're adding a subdomain named `stuff`.
-
-1. Add a new route to `routes.yaml` with a new `stuff` domain prefix. Copying and pasting an existing route is fine.
-2. Copy the `sites/default` directory to `sites/stuff`.
-3. Edit `services.yaml` and add a new database and endpoint. Copying and pasting an existing entry is fine. The new relationship must be named `stuff`.
-4. Edit `.platform.app.yaml` and add a new relationship: `stuff: db:stuff`. (Where `db` is the name of the database service from `services.yaml`.)
-5. Commit the above changes and push.
-6. In your browser, go to the `stuff.example.com` domain (or equivalent on a dev environment) and run through the Drupal installer as usual. Alternatively, you can use Drush as described bellow.
-7. Edit the `sites/stuff/settings.php` file again and enable Redis by setting `$platformsh_enable_redis` to true.
-8. Commit and push that change.
-
-Alternatively, a PHP shell script is provided that automates steps 1-4. See [`psh-subsite-add.php`](psh-subsite-add.php).
-
-
-
-
-Using Drush in multi-site
-
-In a Drupal multi-site setup, sites ID are defined in [web/sites/sites.php](https://github.com/platformsh-templates/drupal8-multisite/blob/master/web/sites/sites.php). By default in this multi-site template, 2 subsites are defined in [routes.yaml](https://github.com/platformsh-templates/drupal8-multisite/blob/master/.platform/routes.yaml): `first` and `second`
-
-Any Drush command can therefore be used on a specific subsite by using `--uri=`. For example:
-* `drush status --uri=first`
-* `drush status --uri=second`
-
-
-
-
-
-
-### 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)
-- [Multi-site best practices on Platform.sh](https://docs.platform.sh/bestpractices/oneormany.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!
-
-
-
-
diff --git a/templates/drupal9-multisite/files/config/sync/first/.gitkeep b/templates/drupal9-multisite/files/config/sync/first/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/drupal9-multisite/files/config/sync/main/.gitkeep b/templates/drupal9-multisite/files/config/sync/main/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/drupal9-multisite/files/config/sync/second/.gitkeep b/templates/drupal9-multisite/files/config/sync/second/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/drupal9-multisite/files/drush/platformsh_generate_drush_yml.php b/templates/drupal9-multisite/files/drush/platformsh_generate_drush_yml.php
deleted file mode 100644
index 9dbb98c17..000000000
--- a/templates/drupal9-multisite/files/drush/platformsh_generate_drush_yml.php
+++ /dev/null
@@ -1,80 +0,0 @@
-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/drupal9-multisite/files/psh-subsite-add.php b/templates/drupal9-multisite/files/psh-subsite-add.php
deleted file mode 100644
index 6e67f2c40..000000000
--- a/templates/drupal9-multisite/files/psh-subsite-add.php
+++ /dev/null
@@ -1,115 +0,0 @@
- $subsiteName,
- 'privileges' => [$subsiteName => 'admin']
- ];
-
- file_put_contents(SERVICES_FILE, Yaml::dump($yaml, 10, 4, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
-}
-
-function addRelationship(string $subsiteName) {
-
- $yaml = Yaml::parseFile(APP_FILE);
-
- $yaml['relationships'][$subsiteName] = "db:{$subsiteName}";
-
- file_put_contents(APP_FILE, Yaml::dump($yaml, 10, 4, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK));
-}
-
-
-main($argv);
diff --git a/templates/drupal9-multisite/files/web/sites/default.services.yml b/templates/drupal9-multisite/files/web/sites/default.services.yml
deleted file mode 100644
index e1bbbc7e2..000000000
--- a/templates/drupal9-multisite/files/web/sites/default.services.yml
+++ /dev/null
@@ -1,174 +0,0 @@
-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 time from the user's last
- # visit to the active session may be deleted by the session garbage
- # collector. When a session is deleted, authenticated users are logged out,
- # and the contents of the user's $_SESSION variable 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'
- #
- 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.
- #
- # 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.
- #
- # 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.
- #
- # Not recommended in production environments
- # @default true
- cache: true
- 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: []
- # Cacheability debugging:
- #
- # Responses with cacheability metadata (CacheableResponseInterface instances)
- # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
- #
- # For more information about debugging cacheable responses, see
- # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
- #
- # 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.
- 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/drupal9-multisite/files/web/sites/default.settings.php b/templates/drupal9-multisite/files/web/sites/default.settings.php
deleted file mode 100644
index 25d498e6f..000000000
--- a/templates/drupal9-multisite/files/web/sites/default.settings.php
+++ /dev/null
@@ -1,765 +0,0 @@
- 'databasename',
- * 'username' => 'sqlusername',
- * 'password' => 'sqlpassword',
- * 'host' => 'localhost',
- * 'port' => '3306',
- * 'driver' => 'mysql',
- * 'prefix' => '',
- * 'collation' => 'utf8mb4_general_ci',
- * );
- * @endcode
- */
- $databases = array();
-
-/**
- * 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.
- *
- * Transaction support is enabled by default for all drivers that support it,
- * including MySQL. To explicitly disable it, set the 'transactions' key to
- * FALSE.
- * Note that some configurations of MySQL, such as the MyISAM engine, don't
- * support it and will proceed silently even if enabled. If you experience
- * transaction related crashes with such configuration, set the 'transactions'
- * key to FALSE.
- *
- * 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".
- *
- * You can optionally set prefixes for some or 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 prefixes
- * are desired, leave it as an empty string ''.
- *
- * To have all database names prefixed, set 'prefix' as a string:
- * @code
- * 'prefix' => 'main_',
- * @endcode
- *
- * Per-table prefixes are deprecated as of Drupal 8.2, and will be removed in
- * Drupal 9.0. After that, only a single prefix for all tables will be
- * supported.
- *
- * To provide prefixes for specific tables, set 'prefix' as an array.
- * The array's keys are the table names and the values are the prefixes.
- * The 'default' element is mandatory and holds the prefix for any tables
- * not specified elsewhere in the array. Example:
- * @code
- * 'prefix' => array(
- * 'default' => 'main_',
- * 'users' => 'shared_',
- * 'sessions' => 'shared_',
- * 'role' => 'shared_',
- * 'authmap' => 'shared_',
- * ),
- * @endcode
- * You can also use a reference to a schema/database as a prefix. This may be
- * useful if your Drupal installation exists in a schema that is not the default
- * or you want to access several databases from the same code base at the same
- * time.
- * Example:
- * @code
- * 'prefix' => array(
- * 'default' => 'main.',
- * 'users' => 'shared.',
- * 'sessions' => 'shared.',
- * 'role' => 'shared.',
- * 'authmap' => 'shared.',
- * );
- * @endcode
- * NOTE: MySQL and SQLite's definition of a schema is a database.
- *
- * 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'] = array(
- * 'init_commands' => array(
- * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
- * ),
- * 'pdo' => array(
- * 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\Core\Database\Driver\mysql\Connection::__construct()
- * - \Drupal\Core\Database\Driver\pgsql\Connection::__construct()
- * - \Drupal\Core\Database\Driver\sqlite\Connection::__construct()
- *
- * Sample Database configuration format for PostgreSQL (pgsql):
- * @code
- * $databases['default']['default'] = array(
- * 'driver' => 'pgsql',
- * 'database' => 'databasename',
- * 'username' => 'sqlusername',
- * 'password' => 'sqlpassword',
- * 'host' => 'localhost',
- * 'prefix' => '',
- * );
- * @endcode
- *
- * Sample Database configuration format for SQLite (sqlite):
- * @code
- * $databases['default']['default'] = array(
- * 'driver' => 'sqlite',
- * 'database' => '/path/to/databasefilename',
- * );
- * @endcode
- */
-
-/**
- * Location of the site configuration files.
- *
- * The $config_directories array specifies the location of file system
- * directories used for configuration data. On install, the "sync" directory is
- * created. This is used for configuration imports. The "active" directory is
- * not created by default since the default storage for active configuration is
- * the database rather than the file system. (This can be changed. See "Active
- * configuration settings" below).
- *
- * The default location for the "sync" directory is inside a randomly-named
- * directory in the public files path. The setting below allows you to override
- * the "sync" location.
- *
- * If you use files for the "active" configuration, you can tell the
- * Configuration system where this directory is located by adding an entry with
- * array key CONFIG_ACTIVE_DIRECTORY.
- *
- * Example:
- * @code
- * $config_directories = array(
- * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
- * );
- * @endcode
- */
-$config_directories = array();
-
-/**
- * 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()
- */
-
-/**
- * The active installation profile.
- *
- * Changing this after installation is not recommended as it changes which
- * directories are scanned during extension discovery. If this is set prior to
- * installation this value will be rewritten according to the profile selected
- * by the user.
- *
- * @see install_select_profile()
- *
- * @deprecated in Drupal 8.3.0 and will be removed before Drupal 9.0.0. The
- * install profile is written to the core.extension configuration. If a
- * service requires the install profile use the 'install_profile' container
- * parameter. Functional code can use \Drupal::installProfile().
- */
-# $settings['install_profile'] = '';
-
-/**
- * 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;
-
-/**
- * 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 (or $settings['reverse_proxy_header'] if set).
- * 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;
-
-/**
- * Specify every reverse proxy IP address in your environment.
- * This setting is required if $settings['reverse_proxy'] is TRUE.
- */
-# $settings['reverse_proxy_addresses'] = array('a.b.c.d', ...);
-
-/**
- * Set this value if your proxy server sends the client IP in a header
- * other than X-Forwarded-For.
- */
-# $settings['reverse_proxy_header'] = 'X_CLUSTER_CLIENT_IP';
-
-/**
- * Set this value if your proxy server sends the client protocol in a header
- * other than X-Forwarded-Proto.
- */
-# $settings['reverse_proxy_proto_header'] = 'X_FORWARDED_PROTO';
-
-/**
- * Set this value if your proxy server sends the client protocol in a header
- * other than X-Forwarded-Host.
- */
-# $settings['reverse_proxy_host_header'] = 'X_FORWARDED_HOST';
-
-/**
- * Set this value if your proxy server sends the client protocol in a header
- * other than X-Forwarded-Port.
- */
-# $settings['reverse_proxy_port_header'] = 'X_FORWARDED_PORT';
-
-/**
- * Set this value if your proxy server sends the client protocol in a header
- * other than Forwarded.
- */
-# $settings['reverse_proxy_forwarded_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;
-
-
-/**
- * Class Loader.
- *
- * If the APC extension is detected, the Symfony APC class loader is used for
- * performance reasons. Detection can be prevented by setting
- * class_loader_auto_detect to false, as in the example below.
- */
-# $settings['class_loader_auto_detect'] = FALSE;
-
-/*
- * If the APC extension is not detected, either because APC is missing or
- * because auto-detection has been disabled, auto-loading falls back to
- * Composer's ClassLoader, which is good for development as it does not break
- * when code is moved in the file system. You can also decorate the base class
- * loader with another cached solution than the Symfony APC class loader, as
- * all production sites should have a cached class loader of some sort enabled.
- *
- * To do so, you may decorate and replace the local $class_loader variable. For
- * example, to use Symfony's APC class loader without automatic detection,
- * uncomment the code below.
- */
-/*
-if ($settings['hash_salt']) {
- $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']);
- $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
- unset($prefix);
- $class_loader->unregister();
- $apc_loader->register();
- $class_loader = $apc_loader;
-}
-*/
-
-/**
- * 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';
-
-/**
- * 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'] = '';
-
-/**
- * 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'][''] = array(
-# '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'] = 'bartik';
-
-/**
- * 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);
-
-/**
- * Active configuration settings.
- *
- * By default, the active configuration is stored in the database in the
- * {config} table. To use a different storage mechanism for the active
- * configuration, do the following prior to installing:
- * - Create an "active" directory and declare its path in $config_directories
- * as explained under the 'Location of the site configuration files' section
- * above in this file. To enhance security, you can declare a path that is
- * outside your document root.
- * - Override the 'bootstrap_config_storage' setting here. It must be set to a
- * callable that returns an object that implements
- * \Drupal\Core\Config\StorageInterface.
- * - Override the service definition 'config.storage.active'. Put this
- * override in a services.yml file in the same directory as settings.php
- * (definitions in this file will override service definition defaults).
- */
-# $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
-
-/**
- * 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['system.theme']['default'] = 'stark';
-# $config['user.settings']['anonymous'] = 'Visitor';
-
-/**
- * Fast 404 pages:
- *
- * Drupal can generate fully themed 404 pages. However, some of these responses
- * are for images or other resource files that are not displayed to the user.
- * This can waste bandwidth, and also generate server load.
- *
- * The options below return a simple, fast 404 page for URLs matching a
- * specific pattern:
- * - $config['system.performance']['fast_404']['exclude_paths']: A regular
- * expression to match paths to exclude, such as images generated by image
- * styles, or dynamically-resized images. The default pattern provided below
- * also excludes the private file system. If you need to add more paths, you
- * can add '|path' to the expression.
- * - $config['system.performance']['fast_404']['paths']: A regular expression to
- * match paths that should return a simple 404 page, rather than the fully
- * themed 404 page. If you don't have any aliases ending in htm or html you
- * can add '|s?html?' to the expression.
- * - $config['system.performance']['fast_404']['html']: The html to return for
- * simple 404 pages.
- *
- * Remove the leading hash signs if you would like to alter this functionality.
- */
-# $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//';
-# $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
-# $config['system.performance']['fast_404']['html'] = '404 Not Found
Not Found
The requested URL "@path" was not found on this server.
';
-
-/**
- * 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'] = array(
- * '^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'] = array(
- * '^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.
- */
-
-/**
- * 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 file_scan_directory()
- * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory()
- */
-$settings['file_scan_ignore_directories'] = [
- 'node_modules',
- 'bower_components',
-];
-
-/**
- * Load local development override configuration, if available.
- *
- * Use settings.local.php to override variables on secondary (staging,
- * development, etc) installations of this site. Typically used to disable
- * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
- * other things that should not happen on development and testing sites.
- *
- * 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/drupal9-multisite/files/web/sites/default/drushrc.php b/templates/drupal9-multisite/files/web/sites/default/drushrc.php
deleted file mode 100644
index 873128564..000000000
--- a/templates/drupal9-multisite/files/web/sites/default/drushrc.php
+++ /dev/null
@@ -1,22 +0,0 @@
- $route) {
- if ($route['type'] === 'upstream'
- && $route['upstream'] === $_ENV['PLATFORM_APPLICATION_NAME']
- && in_array($route['original_url'], $expected_route_urls)) {
- $options['uri'] = $url;
- break;
- }
- }
-}
diff --git a/templates/drupal9-multisite/files/web/sites/default/services.yml b/templates/drupal9-multisite/files/web/sites/default/services.yml
deleted file mode 100644
index 23f6483cc..000000000
--- a/templates/drupal9-multisite/files/web/sites/default/services.yml
+++ /dev/null
@@ -1,155 +0,0 @@
-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 time from the user's last
- # visit to the active session may be deleted by the session garbage
- # collector. When a session is deleted, authenticated users are logged out,
- # and the contents of the user's $_SESSION variable 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'
- #
- 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.
- #
- # 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.
- #
- # 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.
- #
- # Not recommended in production environments
- # @default true
- cache: true
- 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: []
- # Cacheability debugging:
- #
- # Responses with cacheability metadata (CacheableResponseInterface instances)
- # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
- #
- # For more information about debugging cacheable responses, see
- # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
- #
- # 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
diff --git a/templates/drupal9-multisite/files/web/sites/default/settings.php b/templates/drupal9-multisite/files/web/sites/default/settings.php
deleted file mode 100644
index c81c78583..000000000
--- a/templates/drupal9-multisite/files/web/sites/default/settings.php
+++ /dev/null
@@ -1,44 +0,0 @@
- $route) {
- if ($route['type'] === 'upstream'
- && $route['upstream'] === $_ENV['PLATFORM_APPLICATION_NAME']
- && in_array($route['original_url'], $expected_route_urls)) {
- $options['uri'] = $url;
- break;
- }
- }
-}
diff --git a/templates/drupal9-multisite/files/web/sites/first/services.yml b/templates/drupal9-multisite/files/web/sites/first/services.yml
deleted file mode 100644
index 23f6483cc..000000000
--- a/templates/drupal9-multisite/files/web/sites/first/services.yml
+++ /dev/null
@@ -1,155 +0,0 @@
-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 time from the user's last
- # visit to the active session may be deleted by the session garbage
- # collector. When a session is deleted, authenticated users are logged out,
- # and the contents of the user's $_SESSION variable 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'
- #
- 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.
- #
- # 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.
- #
- # 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.
- #
- # Not recommended in production environments
- # @default true
- cache: true
- 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: []
- # Cacheability debugging:
- #
- # Responses with cacheability metadata (CacheableResponseInterface instances)
- # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
- #
- # For more information about debugging cacheable responses, see
- # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
- #
- # 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
diff --git a/templates/drupal9-multisite/files/web/sites/first/settings.php b/templates/drupal9-multisite/files/web/sites/first/settings.php
deleted file mode 100644
index c81c78583..000000000
--- a/templates/drupal9-multisite/files/web/sites/first/settings.php
+++ /dev/null
@@ -1,44 +0,0 @@
- $route) {
- if ($route['type'] === 'upstream'
- && $route['upstream'] === $_ENV['PLATFORM_APPLICATION_NAME']
- && in_array($route['original_url'], $expected_route_urls)) {
- $options['uri'] = $url;
- break;
- }
- }
-}
diff --git a/templates/drupal9-multisite/files/web/sites/main/services.yml b/templates/drupal9-multisite/files/web/sites/main/services.yml
deleted file mode 100644
index 23f6483cc..000000000
--- a/templates/drupal9-multisite/files/web/sites/main/services.yml
+++ /dev/null
@@ -1,155 +0,0 @@
-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 time from the user's last
- # visit to the active session may be deleted by the session garbage
- # collector. When a session is deleted, authenticated users are logged out,
- # and the contents of the user's $_SESSION variable 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'
- #
- 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.
- #
- # 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.
- #
- # 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.
- #
- # Not recommended in production environments
- # @default true
- cache: true
- 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: []
- # Cacheability debugging:
- #
- # Responses with cacheability metadata (CacheableResponseInterface instances)
- # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
- #
- # For more information about debugging cacheable responses, see
- # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
- #
- # 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
diff --git a/templates/drupal9-multisite/files/web/sites/main/settings.php b/templates/drupal9-multisite/files/web/sites/main/settings.php
deleted file mode 100644
index c81c78583..000000000
--- a/templates/drupal9-multisite/files/web/sites/main/settings.php
+++ /dev/null
@@ -1,44 +0,0 @@
- $route) {
- if ($route['type'] === 'upstream'
- && $route['upstream'] === $_ENV['PLATFORM_APPLICATION_NAME']
- && in_array($route['original_url'], $expected_route_urls)) {
- $options['uri'] = $url;
- break;
- }
- }
-}
diff --git a/templates/drupal9-multisite/files/web/sites/second/services.yml b/templates/drupal9-multisite/files/web/sites/second/services.yml
deleted file mode 100644
index 23f6483cc..000000000
--- a/templates/drupal9-multisite/files/web/sites/second/services.yml
+++ /dev/null
@@ -1,155 +0,0 @@
-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 time from the user's last
- # visit to the active session may be deleted by the session garbage
- # collector. When a session is deleted, authenticated users are logged out,
- # and the contents of the user's $_SESSION variable 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'
- #
- 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.
- #
- # 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.
- #
- # 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.
- #
- # Not recommended in production environments
- # @default true
- cache: true
- 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: []
- # Cacheability debugging:
- #
- # Responses with cacheability metadata (CacheableResponseInterface instances)
- # get X-Drupal-Cache-Tags and X-Drupal-Cache-Contexts headers.
- #
- # For more information about debugging cacheable responses, see
- # https://www.drupal.org/developing/api/8/response/cacheable-response-interface
- #
- # 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
diff --git a/templates/drupal9-multisite/files/web/sites/second/settings.php b/templates/drupal9-multisite/files/web/sites/second/settings.php
deleted file mode 100644
index c81c78583..000000000
--- a/templates/drupal9-multisite/files/web/sites/second/settings.php
+++ /dev/null
@@ -1,44 +0,0 @@
-hasRelationship($platformsh_subsite_id)) {
- $creds = $platformsh->credentials($platformsh_subsite_id);
- if ($creds) {
- $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'])]
- ];
- }
-}
-
-// 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->branch == 'master' || $platformsh->onDedicated()) {
- $config['system.logging']['error_level'] = 'hide';
- } // Development type environment.
- else {
- $config['system.logging']['error_level'] = 'verbose';
- }
-}
-
-// Enable Redis caching.
-if ($platformsh->hasRelationship('rediscache') && !InstallerKernel::installationAttempted() && extension_loaded('redis') && class_exists('Drupal\redis\ClientFactory')) {
- $redis = $platformsh->credentials('rediscache');
-
- // Set a cache prefix so not all sites go into the same cache pool.
- $settings['cache_prefix'] = $platformsh_subsite_id . '_';
-
- // 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',
- ],
- ],
- ];
-}
-
-// Configure asset access/management for multi-site.
-$config['system.performance']['css.preprocess'] = 0;
-$config['system.performance']['js.preprocess'] = 0;
-
-// Configure file paths.
-if ($platformsh->inRuntime()) {
- if (!isset($settings['file_public_path'])) {
- $settings['file_public_path'] = 'files/' . $platformsh_subsite_id;
- }
- if (!isset($settings['file_private_path'])) {
- $settings['file_private_path'] = $platformsh->appDir . '/private/' . $platformsh_subsite_id;
- }
- if (!isset($settings['file_temp_path'])) {
- $settings['file_temp_path'] = $platformsh->appDir . '/tmp/' . $platformsh_subsite_id;
- }
-
- // 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'] . $platformsh_subsite_id;
-
- // 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/drupal9-multisite/files/web/sites/sites.php b/templates/drupal9-multisite/files/web/sites/sites.php
deleted file mode 100644
index 438451e5c..000000000
--- a/templates/drupal9-multisite/files/web/sites/sites.php
+++ /dev/null
@@ -1,75 +0,0 @@
-..' => '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 = array(
- * '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
- */
-
-$platformsh = new \Platformsh\ConfigReader\Config();
-
-if (!$platformsh->inRuntime()) {
- return;
-}
-
-// The following block adds a $sites[] entry for each subdomain that is defined
-// in routes.yaml.
-// If you are not using subdomain-based multisite routes then you will need to
-// adapt the code below accordingly.
-foreach ($platformsh->getUpstreamRoutes($platformsh->applicationName) as $route) {
- $host = parse_url($route['url'], PHP_URL_HOST);
- if ($host !== FALSE) {
- $subdomain = substr($host, 0, strpos($host,'.'));
- $sites[$host] = $subdomain;
- }
-}
-
-// Add additional domain mappings here.
diff --git a/templates/drupal9/files/.editorconfig b/templates/drupal9/files/.editorconfig
deleted file mode 100644
index 76b0d7c09..000000000
--- a/templates/drupal9/files/.editorconfig
+++ /dev/null
@@ -1,20 +0,0 @@
-# Drupal editor configuration normalization
-# @see http://editorconfig.org/
-
-# This is the top-most .editorconfig file; do not search in parent directories.
-root = true
-
-# All files.
-[*]
-end_of_line = LF
-indent_style = space
-indent_size = 2
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[composer.{json,lock}]
-indent_size = 4
-
-[.platform.app.yaml]
-indent_size = 4
diff --git a/templates/drupal9/files/.environment b/templates/drupal9/files/.environment
deleted file mode 100644
index 3e0014164..000000000
--- a/templates/drupal9/files/.environment
+++ /dev/null
@@ -1,11 +0,0 @@
-# Statements in this file will be executed (sourced) by the shell in SSH
-# sessions, in deploy hooks, in cron jobs, and in the application's runtime
-# environment. This file must be placed in the root of the application, not
-# necessarily the git repository's root. In case of multiple applications,
-# each application can have its own .environment file.
-
-# Allow executable app dependencies from Composer to be run from the path.
-if [ -n "$PLATFORM_APP_DIR" -a -f "$PLATFORM_APP_DIR"/composer.json ] ; then
- bin=$(composer config bin-dir --working-dir="$PLATFORM_APP_DIR" --no-interaction 2>/dev/null)
- export PATH="${PLATFORM_APP_DIR}/${bin:-vendor/bin}:${PATH}"
-fi
diff --git a/templates/drupal9/files/.gitignore b/templates/drupal9/files/.gitignore
deleted file mode 100644
index 6b6444a2c..000000000
--- a/templates/drupal9/files/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
diff --git a/templates/drupal9/files/README.md b/templates/drupal9/files/README.md
deleted file mode 100644
index cd6f46864..000000000
--- a/templates/drupal9/files/README.md
+++ /dev/null
@@ -1,736 +0,0 @@
-
-
-Contribute, request a feature, or check out our resources
-
-
-Join our community      
-Documentation      
-Blog      
-Report a bug      
-Request a feature
-
-
-
-## About
-
-This template builds Drupal 9 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.0
-- MariaDB 10.4
-- Redis 6
-- 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/drupal9 -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/drupal9
-```
-
-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/drupal9/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/drupal9.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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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 `drupal9` 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. A configuration file has already been provided at `.ddev/providers/platform.yaml`, so you should not need to 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 drupal9 && cd drupal9
-$ 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 9.3.9
-
-```
-
-
-
-### 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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/9.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!
-
-
-
-
diff --git a/templates/drupal9/files/config/sync/.gitkeep b/templates/drupal9/files/config/sync/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/drupal9/files/drush/platformsh_deploy_drupal.sh b/templates/drupal9/files/drush/platformsh_deploy_drupal.sh
deleted file mode 100755
index dee7f35e1..000000000
--- a/templates/drupal9/files/drush/platformsh_deploy_drupal.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/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 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/drupal9/files/drush/platformsh_generate_drush_yml.php b/templates/drupal9/files/drush/platformsh_generate_drush_yml.php
deleted file mode 100644
index 9dbb98c17..000000000
--- a/templates/drupal9/files/drush/platformsh_generate_drush_yml.php
+++ /dev/null
@@ -1,80 +0,0 @@
-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/drupal9/files/web/sites/default/settings.php b/templates/drupal9/files/web/sites/default/settings.php
deleted file mode 100644
index 7fc6948e6..000000000
--- a/templates/drupal9/files/web/sites/default/settings.php
+++ /dev/null
@@ -1,43 +0,0 @@
-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'])]
- ];
-}
-
-// 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->branch == 'master' || $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/echo/files/.gitignore b/templates/echo/files/.gitignore
deleted file mode 100644
index 154839d39..000000000
--- a/templates/echo/files/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/.GOPATH
-/bin
diff --git a/templates/echo/files/.platform.app.yaml b/templates/echo/files/.platform.app.yaml
index ffeb1e8f6..4fe74b99d 100644
--- a/templates/echo/files/.platform.app.yaml
+++ b/templates/echo/files/.platform.app.yaml
@@ -1,52 +1,76 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
# The runtime the application uses.
-type: golang:1.16
-
-# The hooks executed at various points in the lifecycle of the application.
-hooks:
- build: |
- # Modify this line if you want to build differently or use an alternate name for your executable.
- go build -o bin/app
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: golang:1.17
# 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"
+ database: "db:mysql"
-# The configuration of app when it is exposed to the web.
-web:
- upstream:
- socket_family: tcp
- protocol: http
-
- commands:
- # If you change the build output in the build hook above, update this line as well.
- start: ./bin/app
-
- locations:
- /:
- # Route all requests to the Go app, unconditionally.
- # If you want some files served directly by the web server without hitting Go, see
- # https://docs.platform.sh/configuration/app/web.html
- allow: false
- passthru: true
-
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 1024
+# 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:
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ socket_family: tcp
+ protocol: http
+
+ # 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.
+ start: ./bin/app
+
+ # 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:
+ /:
+ # Whether to allow serving files which don’t match a rule.
+ # Route all requests to the Go app, unconditionally.
+ # If you want some files served directly by the web server without hitting Go, see
+ # https://docs.platform.sh/configuration/app/web.html
+ allow: false
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ # Modify this line if you want to build differently or use an alternate name for your executable.
+ go build -o bin/app
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
-
+
diff --git a/templates/echo/files/.platform/routes.yaml b/templates/echo/files/.platform/routes.yaml
index 035ecb0fa..2e5319ae5 100644
--- a/templates/echo/files/.platform/routes.yaml
+++ b/templates/echo/files/.platform/routes.yaml
@@ -2,11 +2,13 @@
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
-
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
type: upstream
upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
type: redirect
to: "https://{default}/"
diff --git a/templates/echo/files/.platform/services.yaml b/templates/echo/files/.platform/services.yaml
index 4cf9889d9..5c648e87f 100644
--- a/templates/echo/files/.platform/services.yaml
+++ b/templates/echo/files/.platform/services.yaml
@@ -2,7 +2,8 @@
#
# Each service listed will be deployed
# to power your Platform.sh project.
-
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
type: mariadb:10.4
disk: 1024
diff --git a/templates/echo/files/README.md b/templates/echo/files/README.md
deleted file mode 100644
index 86386d6dc..000000000
--- a/templates/echo/files/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Echo for Platform.sh
-
-
-Contribute, request a feature, or check out our resources
-
-
-Join our community      
-Documentation      
-Blog      
-Report a bug      
-Request a feature
-
-
-## About
-
-This template demonstrates building the Flask framework for Platform.sh. It includes a minimalist application skeleton that demonstrates how to connect to a MariaDB server for data storage and Redis for caching. The application starts as a bare Python process with no separate runner. It is intended for you to use as a starting point and modify for your own needs.
-
-Flask is a lightweight web microframework for Python.
-
-## Features
-
-- Python 3.7
-- Flask 2
-- MariaDB 10.4
-- Redis 5.0
-- Automatic TLS certificates
-- Pipfile-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.
-
-
-
-
-#### Other deployment options
-
-For all of the other options below, clone this repository first:
-
-```bash
-git clone https://github.com/platformsh-templates/flask
-```
-
-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/flask/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/flask.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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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/flask`.
-
-1. Install the Platform.sh CLI
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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
-
- Follow the instructions to [install the Platform.sh CLI](https://docs.platform.sh/administration/cli.html) for your operating system.
- 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.
-
-
-
-
-### 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)
-
-## Customizations
-
-The following files have been added to a basic Flask configuration. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-- The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-- An additional Pip library, [`platformshconfig`](https://github.com/platformsh/config-reader-python), has been added. It provides convenience wrappers for accessing the Platform.sh environment variables.
-- A rudimentary application is included in `server.py` for demonstration purposes. It shows the basic process of starting the server and connecting to the MariaDB database. Modify and replace it as desired.
-
-## Local Development
-
-Platform.sh provides support for locally running a Flask application that has been deployed on Platform.sh including its services. This means that once you download the code of the Flask project you deployed on Platform.sh, you can make changes to the project without pushing to Platform.sh each time to test them. You can build your app locally using the Platform.sh CLI, even when its functionality depends on a number of services. You can run your Flaks application locally with all of it’s services by following these steps:
-
-- Download your deployed code by running the following command using the Platform.sh CLI:
-
- ```bash
- platform get
- ```
-
-- Create a new branch. Whenever you develop Platform.sh, you should develop in an isolated environment. This way you aren’t opening SSH tunnels to your production environment. By creating a branch from your default environment, you create a new environment with copies of all production code and data.
-
- Create an isolated environment named updates by running the following command:
-
- platform environment:branch updates
-
-- Expose a port for your application to run on by running the following command in your terminal:
-
- export PORT=8000
-
-- Install all the dependencies your application needs.
-
- pipenv --three install
-
-- Open a SSH tunnel to the environment’s database and services:
-
- platform tunnel:open
-
-- Add an environment variable that contains the service credentials:
-
- ```bash
- export PLATFORM_RELATIONSHIPS="$(platform tunnel:info --encode)"
- ```
-
-- Run the application server
-
- pipenv run python server.py
-
- Now your Flask app should be running locally with a connection to a remote database that’s separate from your production database.
-
-> **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.
-
-## 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.
-
-
-
-### 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)
-
-#### Profiling a Flask application
-
-
-
-
-
-
-As mentioned above, this template includes a starting `.blackfire.yaml` file that can be used to activate Blackfire on a project. In other to run a simple profile on this application there following steps are to be carried out:
-
-- Sign up for a [Blackfire](https://blackfire.io) account and follow the onboarding guide.
-
-- Open a [tunnel](#local-development).
-
-- Using your terminal, install Blackfire and all of it's dependencies using the instructions [here](https://blackfire.io/docs/up-and-running/installation).
-
-- In your terminal, Export the flask application
-
- ```bash
- export FLASK_APP=server.py
- ```
-
-- Start the aplication server by running the following command:
- ```bash
- blackfire-python flask run
- ```
-
-- Go to `localhost:5000` or the port you've selected in your browser, with the [Blackfire Browser extension](https://blackfire.io/docs/integrations/browsers/index) click on "Profile"
-
-
-- A new section at the top of your browser will be displayed to showcase the profiling in progress.
-
-
-
-
-- After profiling is done, you can click on any of the buttons on that section to see more information about the application profiling results.
-
-- Congratulations, you just profiled a Flask application with Blackfire.
-
-### Resources
-
-- [Flask](http://flask.pocoo.org/)
-- [Python on Platform.sh](https://docs.platform.sh/languages/python.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!
-
-
-
-
diff --git a/templates/flask/files/flask.png b/templates/flask/files/flask.png
deleted file mode 100644
index 162039439..000000000
Binary files a/templates/flask/files/flask.png and /dev/null differ
diff --git a/templates/flask/files/install-poetry.sh b/templates/flask/files/install-poetry.sh
deleted file mode 100755
index 3f8d79d8f..000000000
--- a/templates/flask/files/install-poetry.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-# Install poetry
-curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py >> install-poetry.py
-python install-poetry.py --version $POETRY_VERSION
-# Source the Poetry command.
-. $PLATFORM_APP_DIR/.poetry/env
-# Add Poetry to .bash_profile, so available during SSH.
-echo ". $PLATFORM_APP_DIR/.poetry/env" >> ~/.bash_profile
diff --git a/templates/flask/files/pyproject.toml b/templates/flask/files/pyproject.toml
deleted file mode 100644
index 98aa5cab0..000000000
--- a/templates/flask/files/pyproject.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[tool.poetry]
-name = "platformsh-flask"
-version = "0.1.0"
-description = ""
-authors = ["chadcarlson "]
-license = "BSD-3"
-
-[tool.poetry.dependencies]
-python = "^3.9"
-Flask = "^2.1.2"
-redis = "^4.2.2"
-PyMySQL = "^1.0.2"
-gevent = "^21.12.0"
-platformshconfig = "^2.4.0"
-
-[tool.poetry.dev-dependencies]
-
-[build-system]
-requires = ["poetry-core>=1.0.0"]
-build-backend = "poetry.core.masonry.api"
diff --git a/templates/flask/files/server.py b/templates/flask/files/server.py
deleted file mode 100644
index 2f925d5ce..000000000
--- a/templates/flask/files/server.py
+++ /dev/null
@@ -1,75 +0,0 @@
-import traceback
-import uuid
-import sys
-
-import flask
-import flask.json
-import gevent.pywsgi
-import pymysql
-import redis
-
-from platformshconfig import Config
-
-app = flask.Flask(__name__)
-config = Config()
-
-
-@app.route('/')
-def root():
- tests = {
- "database": wrap_test(test_mysql, config.credentials("database")),
- "redis": wrap_test(test_redis, config.credentials("rediscache"))
- }
- return flask.json.jsonify(tests)
-
-
-def wrap_test(callback, *args, **kwargs):
- try:
- result = callback(*args, **kwargs)
- return {
- "status": "OK",
- "return": result,
- }
- except Exception:
- return {
- "status": "ERROR",
- "error": traceback.format_exception(*sys.exc_info())
- }
-
-
-def test_mysql(instance):
- connection = pymysql.connect(
- host=instance["host"],
- port=instance["port"],
- user=instance["username"],
- password=instance["password"],
- db=instance["path"],
- charset='utf8mb4',
- cursorclass=pymysql.cursors.DictCursor,
- )
-
- try:
- with connection.cursor() as cursor:
- cursor.execute("SELECT 1")
- cursor.fetchone()
-
- finally:
- connection.close()
-
-
-def test_redis(instance):
- r = redis.StrictRedis(
- host=instance["host"],
- port=instance["port"],
- db=0,
- )
- key_name = "foo-%s" + str(uuid.uuid4())
- value = b"bar"
-
- r.set(key_name, "bar")
- assert value == r.get(key_name)
-
-
-if __name__ == "__main__":
- http_server = gevent.pywsgi.WSGIServer(('127.0.0.1', int(config.port)), app)
- http_server.serve_forever()
diff --git a/templates/gatsby/files/.platform.app.yaml b/templates/gatsby/files/.platform.app.yaml
index 6471a90ed..770a17f14 100644
--- a/templates/gatsby/files/.platform.app.yaml
+++ b/templates/gatsby/files/.platform.app.yaml
@@ -1,43 +1,66 @@
-# .platform.app.yaml
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this application, which must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: 'app'
-# The type key specifies the language and version for your application.
-type: 'nodejs:16'
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: 'nodejs:18'
-# Use Yarn instead of npm.
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 5120
+
+# 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:
+ # 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:
+ '/':
+ # The directory to serve static assets for this location relative to the app’s root directory. Must be an
+ # actual directory inside the root directory.
+ root: 'public'
+ # Files to consider when serving a request for a directory.
+ index: [ 'index.html' ]
+ # Whether to allow serving files which don’t match a rule.
+ allow: true
+
+# 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
build:
- flavor: none
+ flavor: none
-# Build dependencies.
+# 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:
- nodejs:
- yarn: "1.22.5"
+ nodejs:
+ yarn: "1.22.5"
-# The hooks that will be triggered when the package is deployed.
+# 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:
- # Build hooks can modify the application files on disk but not access any services like databases.
- build: |
- yarn
- yarn build
-
-# The size of the persistent disk of the application (in MB).
-disk: 5120
-
-# The configuration of the application when it is exposed to the web.
-web:
- locations:
- '/':
- # The public directory of the application relative to its root.
- root: 'public'
- index: ['index.html']
- scripts: false
- allow: true
+ # The build hook is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ yarn
+ yarn build
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
-
diff --git a/templates/gatsby/files/.platform/routes.yaml b/templates/gatsby/files/.platform/routes.yaml
index a7af97a6e..b2c339c7b 100644
--- a/templates/gatsby/files/.platform/routes.yaml
+++ b/templates/gatsby/files/.platform/routes.yaml
@@ -1,3 +1,8 @@
+# The routes of the project.
+#
+# Each route describes how an incoming URL is going
+# to be processed by Platform.sh.
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
type: upstream
upstream: "app:http"
diff --git a/templates/gatsby/files/README.md b/templates/gatsby/files/README.md
deleted file mode 100644
index 0b10d5012..000000000
--- a/templates/gatsby/files/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Gatsby for Platform.sh
-
-
-
-This template builds a simple application using Gatsby. Gatsby is a free and open source framework based on React that helps developers build blazing fast websites and apps. The website is statically generated by a Node.js application during the build step, and then served statically at runtime.
-
-## Features
-
-* Node.js 16
-* Automatic TLS certificates
-* yarn-based build
-
-## Customizations
-
-This template customizes the [Gatsby starter blog](https://github.com/gatsbyjs/gatsby-starter-blog) boilerplate project, but the changes will be very similar for most Gatsby projects. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* An additional module, [`config-reader-nodejs`](https://github.com/platformsh/config-reader-nodejs), has been added. It provides convenience wrappers for accessing the Platform.sh environment variables.
-
-## References
-
-* [Gatsby](https://www.gatsbyjs.org/)
-* [Node.js on Platform.sh](https://docs.platform.sh/languages/nodejs.html)
diff --git a/templates/gin/files/.gitignore b/templates/gin/files/.gitignore
deleted file mode 100644
index 154839d39..000000000
--- a/templates/gin/files/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/.GOPATH
-/bin
diff --git a/templates/gin/files/.platform.app.yaml b/templates/gin/files/.platform.app.yaml
index d9b616352..79dc39ea7 100644
--- a/templates/gin/files/.platform.app.yaml
+++ b/templates/gin/files/.platform.app.yaml
@@ -1,50 +1,73 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: golang:1.14
-# The hooks executed at various points in the lifecycle of the application.
-hooks:
- build: |
- # Modify this line if you want to build differently or use an alternate name for your executable.
- go build -o bin/app
-
# 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"
+ database: "db:mysql"
-# The configuration of app when it is exposed to the web.
-web:
- upstream:
- socket_family: tcp
- protocol: http
-
- commands:
- # If you change the build output in the build hook above, update this line as well.
- start: ./bin/app
-
- locations:
- /:
- # Route all requests to the Go app, unconditionally.
- # If you want some files served directly by the web server without hitting Go, see
- # https://docs.platform.sh/configuration/app/web.html
- allow: false
- passthru: true
-
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 1024
+# 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.
+ # If you change the build output in the build hook, update this line as well.
+ start: ./bin/app
+ # More information: https://docs.platform.sh/configuration/app-containers.html#upstream
+ upstream:
+ # 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
+ socket_family: tcp
+ # Whether your app receives incoming requests over HTTP or FastCGI. See link above for upstream for more information
+ protocol: http
+
+ # 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:
+ /:
+ # Whether to allow serving files which don’t match a rule.
+ # Route all requests to the Go app, unconditionally.
+ allow: false
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: true
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ # Modify this line if you want to build differently or use an alternate name for your executable.
+ go build -o bin/app
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
diff --git a/templates/gin/files/.platform/routes.yaml b/templates/gin/files/.platform/routes.yaml
index 035ecb0fa..5a6dfc2f3 100644
--- a/templates/gin/files/.platform/routes.yaml
+++ b/templates/gin/files/.platform/routes.yaml
@@ -2,11 +2,13 @@
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
-
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
- type: upstream
- upstream: "app:http"
+ type: upstream
+ upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
- type: redirect
- to: "https://{default}/"
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/gin/files/.platform/services.yaml b/templates/gin/files/.platform/services.yaml
index 4cf9889d9..5c648e87f 100644
--- a/templates/gin/files/.platform/services.yaml
+++ b/templates/gin/files/.platform/services.yaml
@@ -2,7 +2,8 @@
#
# Each service listed will be deployed
# to power your Platform.sh project.
-
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
type: mariadb:10.4
disk: 1024
diff --git a/templates/gin/files/README.md b/templates/gin/files/README.md
deleted file mode 100644
index dc99f3d47..000000000
--- a/templates/gin/files/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Gin for Platform.sh
-
-
-
-This template demonstrates building the Gin framework for Platform.sh using Go modules. It includes a minimalist application skeleton that demonstrates how to connect to a MariaDB server for data storage. It is intended for you to use as a starting point and modify for your own needs.
-
-Gin is a lightweight web framework written in Go that emphasizes performance.
-
-## Features
-
-* Go 1.14
-* MariaDB 10.4
-* Git module-based build
-
-## Customizations
-
-This project relies on Go module support in Go 1.11 and later. You should commit your `go.mod` and `go.sum` files to Git, but not the `vendor` directory.
-
-The following files and additions make the framework work. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* An additional Go module, [`platformsh/config-reader-go`](https://github.com/platformsh/config-reader-go), has been added. It provides convenience wrappers for accessing the Platform.sh environment variables.
-
-## References
-
-* [Gin](https://gin-gonic.com/)
-* [Go on Platform.sh](https://docs.platform.sh/languages/go.html)
diff --git a/templates/gin/files/go.mod b/templates/gin/files/go.mod
deleted file mode 100644
index ce6149a03..000000000
--- a/templates/gin/files/go.mod
+++ /dev/null
@@ -1,10 +0,0 @@
-module github.com/platformsh/template-gin
-
-require (
- github.com/gin-gonic/gin v1.6.3
- github.com/go-sql-driver/mysql v1.4.1
- github.com/platformsh/config-reader-go/v2 v2.2.1
- google.golang.org/appengine v1.6.1 // indirect
-)
-
-go 1.14
diff --git a/templates/gin/files/go.sum b/templates/gin/files/go.sum
deleted file mode 100644
index d6a3db039..000000000
--- a/templates/gin/files/go.sum
+++ /dev/null
@@ -1,56 +0,0 @@
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3 h1:t8FVkw33L+wilf2QiWkw0UV77qRpcH/JHPKGpKa2E8g=
-github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
-github.com/gin-gonic/gin v1.4.0 h1:3tMoCCfM7ppqsR0ptz/wi1impNpT7/9wQtMZ8lr1mCQ=
-github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
-github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
-github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
-github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
-github.com/mattn/go-isatty v0.0.7 h1:UvyT9uN+3r7yLEYSlJsbQGdsaB/a0DlgWP3pql6iwOc=
-github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/platformsh/config-reader-go/v2 v2.2.1 h1:JHhN1qQoTXJDWQz/CCNTEAxs2vBuW5+4YsLPZ7qWf1M=
-github.com/platformsh/config-reader-go/v2 v2.2.1/go.mod h1:b1XoU9pi4yfOL2HGUKp40BQOhhqJFMNbNXBtwousNR0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw=
-github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c h1:+EXw7AwNOKzPFXMZ1yNjO40aWCh3PIquJB2fYlv9wcs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-google.golang.org/appengine v1.6.1 h1:QzqyMA1tlu6CgqCDUtU9V+ZKhLFT2dkJuANu5QaxI3I=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
-gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
-gopkg.in/go-playground/validator.v8 v8.18.2 h1:lFB4DoMU6B626w8ny76MV7VX6W2VHct2GVOI3xgiMrQ=
-gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
-gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/templates/gin/files/server.go b/templates/gin/files/server.go
deleted file mode 100644
index c7acb80bd..000000000
--- a/templates/gin/files/server.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package main
-
-import (
- "database/sql"
- "fmt"
- "github.com/gin-gonic/gin"
- _ "github.com/go-sql-driver/mysql"
- psh "github.com/platformsh/config-reader-go/v2"
- sqldsn "github.com/platformsh/config-reader-go/v2/sqldsn"
- "net/http"
-)
-
-func setupRouter(config *psh.RuntimeConfig) *gin.Engine {
-
- r := gin.Default()
-
- // Hello World
- r.GET("/", func(c *gin.Context) {
-
- // Accessing the database relationship Credentials struct
- credentials, err := config.Credentials("database")
- if err != nil {
- panic(err)
- }
-
- // Using the sqldsn formatted credentials package
- formatted, err := sqldsn.FormattedCredentials(credentials)
- if err != nil {
- panic(err)
- }
-
- db, err := sql.Open("mysql", formatted)
- checkErr(err)
-
- // Force MySQL into modern mode.
- db.Exec("SET NAMES=utf8")
- db.Exec("SET sql_mode = 'ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,ONLY_FULL_GROUP_BY'")
-
- _, err = db.Exec("DROP TABLE IF EXISTS userinfo")
- checkErr(err)
-
- _, err = db.Exec(`CREATE TABLE userinfo (
- uid INT(10) NOT NULL AUTO_INCREMENT,
- username VARCHAR(64) NULL DEFAULT NULL,
- departname VARCHAR(128) NULL DEFAULT NULL,
- created DATE NULL DEFAULT NULL,
- PRIMARY KEY (uid)
- ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;`)
- checkErr(err)
-
- // insert
- stmt, err := db.Prepare("INSERT userinfo SET username=?,departname=?,created=?")
- checkErr(err)
-
- res, err := stmt.Exec("platform", "Deploy Friday", "2019-06-17")
- checkErr(err)
-
- id, err := res.LastInsertId()
- checkErr(err)
-
- fmt.Println(id)
- // update
- stmt, err = db.Prepare("update userinfo set username=? where uid=?")
- checkErr(err)
-
- res, err = stmt.Exec("goPlatformsh", id)
- checkErr(err)
-
- affect, err := res.RowsAffected()
- checkErr(err)
-
- fmt.Println(affect)
-
- // query
- rows, err := db.Query("SELECT * FROM userinfo")
- checkErr(err)
-
- var uid int
- var username string
- var department string
- var created string
- for rows.Next() {
- err = rows.Scan(&uid, &username, &department, &created)
- checkErr(err)
- }
-
- // delete
- stmt, err = db.Prepare("delete from userinfo where uid=?")
- checkErr(err)
-
- res, err = stmt.Exec(id)
- checkErr(err)
-
- affect, err = res.RowsAffected()
- checkErr(err)
-
- db.Close()
-
- status := fmt.Sprintf(`Hello, World! - A simple Gin web framework template for Platform.sh
-
-
-MySQL Tests:
-
-* Connect and add row:
- - Row ID (1): %d
- - Username (goPlatformsh): %s
- - Department (Deploy Friday): %s
- - Created (2019-06-17): %s
-* Delete row:
- - Status (1): %d
-
- `, uid, username, department, created, affect)
-
- c.String(http.StatusOK, status)
- })
-
- return r
-}
-
-func main() {
-
- config, err := psh.NewRuntimeConfig()
- if err != nil {
- panic("Not in a Platform.sh Environment.")
- }
-
- r := setupRouter(config)
-
- // Listen and Server in the port defined by Platform.sh
- r.Run(":" + config.Port())
-}
-
-// checkErr is a simple wrapper for panicking on error.
-// It likely should not be used in a real application.
-func checkErr(err error) {
- if err != nil {
- panic(err)
- }
-}
diff --git a/templates/koa/files/.gitignore b/templates/koa/files/.gitignore
deleted file mode 100644
index 2f32417c8..000000000
--- a/templates/koa/files/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-.DS_Store
-.idea/*
diff --git a/templates/koa/files/.platform.app.yaml b/templates/koa/files/.platform.app.yaml
index 104383447..0e843bdd1 100644
--- a/templates/koa/files/.platform.app.yaml
+++ b/templates/koa/files/.platform.app.yaml
@@ -1,28 +1,44 @@
-# .platform.app.yaml
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this application, which must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
name: app
-# The type key specifies the language and version for your application.
-type: nodejs:10
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: nodejs:18
# 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"
-# The configuration of the application when it is exposed to the web.
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 512
+
+# 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.
start: "node index.js"
-# The size of the persistent disk of the application (in MB).
-disk: 512
-
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
diff --git a/templates/koa/files/.platform/routes.yaml b/templates/koa/files/.platform/routes.yaml
index 035ecb0fa..5a6dfc2f3 100644
--- a/templates/koa/files/.platform/routes.yaml
+++ b/templates/koa/files/.platform/routes.yaml
@@ -2,11 +2,13 @@
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
-
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
- type: upstream
- upstream: "app:http"
+ type: upstream
+ upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
- type: redirect
- to: "https://{default}/"
+ type: redirect
+ to: "https://{default}/"
diff --git a/templates/koa/files/.platform/services.yaml b/templates/koa/files/.platform/services.yaml
index 4cb256d97..9e7794655 100644
--- a/templates/koa/files/.platform/services.yaml
+++ b/templates/koa/files/.platform/services.yaml
@@ -2,7 +2,8 @@
#
# Each service listed will be deployed
# to power your Platform.sh project.
-
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
- type: 'mariadb:10.2'
- disk: 1024
+ type: 'mariadb:10.2'
+ disk: 1024
diff --git a/templates/koa/files/README.md b/templates/koa/files/README.md
deleted file mode 100644
index d0e7ccec8..000000000
--- a/templates/koa/files/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Koa for Platform.sh
-
-
-
-This template provides a basic Laravel skeleton. It comes pre-configured to use a MariaDB database and Redis for caching and sessions using a Laravel-specific bridge library that runs during Composer autoload. The public files symlink is also replaced with a custom web path definition so it is unnecessary. It is intended for you to use as a starting point and modify for your own needs.
-
-Laravel is an opinionated, integrated rapid-application-development framework for PHP.
-
-## Features
-
-* PHP 7.4
-* MariaDB 10.4
-* Redis 5.0
-* Automatic TLS certificates
-* Composer-based build
-
-## Customizations
-
-The following changes have been made relative to a plain Laravel project. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* An additional Composer library, [`platformsh/laravel-bridge`](https://github.com/platformsh/laravel-bridge), has been added. It automatically maps Platform.sh's environment variables to Laravel's environment variables where possible. It leverages the [`platformsh/config-reader`](https://github.com/platformsh/config-reader-php) library.
-* The Laravel Bridge library also automatically configures Laravel to use Redis for both caching and session storage. That may be disabled by removing or changing the name of the `rediscache` and `redissession` relationships in `.platform.app.yaml`.
-* Laravel normally wants you to create a symlink for the public storage directory, using the `artisan storage:link` command. That is not necessary and will not work on Platform.sh due to the read-only file system. Instead, a dedicated web path mapping is included for the `/storage` path that has the same effect.
-
-## References
-
-* [Laravel](https://laravel.com/)
-* [PHP on Platform.sh](https://docs.platform.sh/languages/php.html)
diff --git a/templates/magento2ce/files/.gitignore b/templates/magento2ce/files/.gitignore
deleted file mode 100644
index 8b8e99c59..000000000
--- a/templates/magento2ce/files/.gitignore
+++ /dev/null
@@ -1,118 +0,0 @@
-/.buildpath
-/.cache
-/.metadata
-/.project
-/.settings
-/.vscode
-atlassian*
-/nbproject
-/robots.txt
-/pub/robots.txt
-/sitemap
-/sitemap.xml
-/pub/sitemap
-/pub/sitemap.xml
-/.idea
-/.gitattributes
-/app/config_sandbox
-/app/etc/config.php
-/app/etc/env.php
-/app/code/Magento/TestModule*
-/lib/internal/flex/uploader/.actionScriptProperties
-/lib/internal/flex/uploader/.flexProperties
-/lib/internal/flex/uploader/.project
-/lib/internal/flex/uploader/.settings
-/lib/internal/flex/varien/.actionScriptProperties
-/lib/internal/flex/varien/.flexLibProperties
-/lib/internal/flex/varien/.project
-/lib/internal/flex/varien/.settings
-/node_modules
-/.grunt
-/Gruntfile.js
-/package.json
-/.php_cs
-/.php_cs.cache
-/.php-cs-fixer.php
-/.php-cs-fixer.cache
-/grunt-config.json
-/pub/media/*.*
-!/pub/media/.htaccess
-/pub/media/attribute/*
-!/pub/media/attribute/.htaccess
-/pub/media/analytics/*
-/pub/media/catalog/*
-!/pub/media/catalog/.htaccess
-/pub/media/customer/*
-!/pub/media/customer/.htaccess
-/pub/media/downloadable/*
-!/pub/media/downloadable/.htaccess
-/pub/media/favicon/*
-/pub/media/import/*
-!/pub/media/import/.htaccess
-/pub/media/logo/*
-/pub/media/custom_options/*
-!/pub/media/custom_options/.htaccess
-/pub/media/theme/*
-/pub/media/theme_customization/*
-!/pub/media/theme_customization/.htaccess
-/pub/media/wysiwyg/*
-!/pub/media/wysiwyg/.htaccess
-/pub/media/tmp/*
-!/pub/media/tmp/.htaccess
-/pub/media/captcha/*
-/pub/media/sitemap/*
-!/pub/media/sitemap/.htaccess
-/pub/static/*
-!/pub/static/.htaccess
-
-/var/*
-!/var/.htaccess
-/vendor/*
-!/vendor/.htaccess
-/generated/*
-!/generated/.htaccess
-.DS_Store
-
-# Platform.sh
-app/*
-!app/.htaccess
-!app/etc/vendor_path.php
-bin/*
-!bin/.htaccess
-dev
-!dev/.htaccess
-generated/*
-!generated/.htaccess
-lib/*
-!lib/.htaccess
-phpserver/*
-!phpserver/.htaccess
-!phpserver/README.md
-
-pub/*
-!pub/.htaccess
-!pub/errors/.htaccess
-!pub/static/.htaccess
-setup/*
-!setup/.htaccess
-!setup/config/.htaccess
-!setup/performance-toolkit/.htaccess
-!setup/pub/.htaccess
-!setup/src/.htaccess
-!setup/view/.htaccess
-
-.php-cs-fixer.dist.php
-.user.ini
-Gruntfile.js.sample
-auth.json.sample
-grunt-config.json.sample
-nginx.conf.sample
-package.json.sample
-.htaccess.sample
-
-docker-sync.yml
-mutagen.sh
-php.dev.ini
-.php_cs.dist
-.travic.yml.simple
-.user.ini
\ No newline at end of file
diff --git a/templates/magento2ce/files/.platform.app.yaml b/templates/magento2ce/files/.platform.app.yaml
index a9dbbb5ce..3aea085dc 100644
--- a/templates/magento2ce/files/.platform.app.yaml
+++ b/templates/magento2ce/files/.platform.app.yaml
@@ -1,113 +1,161 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
-name: app
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
+name: magento
# The runtime the application uses.
-type: php:8.1
-
-# Specify additional PHP extensions that should be loaded.
-runtime:
- extensions:
- - xsl
- - sodium
- - redis
- - blackfire
-
-# Configuration of the build of this application.
-build:
- flavor: composer
-
-dependencies:
- php:
- composer/composer: '^2'
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: php:7.4
# 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
- elasticsearch: indexer:elasticsearch
- rabbitmq: queue:rabbitmq
+ database: magento_database:mysql
+ redis: magento_redis:redis
+ search: magento_search:opensearch
-# The size of the persistent disk of the application (in MB).
+# 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 define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
- "/var":
- source: local
- source_path: "var"
- "/app/etc":
- source: local
- source_path: "etc"
- "/pub/media":
- source: local
- source_path: "media"
- "/pub/static":
- source: local
- source_path: "static"
+ "var": "shared:files/var"
+ "generated": "shared:files/generated"
+ "app/etc": "shared:files/etc"
+ "pub/media": "shared:files/media"
+ "pub/static": "shared:files/static"
+
+# 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:
+ # 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:
+ '/':
+ # The directory to serve static assets for this location relative to the app’s root directory. Must be an
+ # actual directory inside the root directory.
+ root: "pub"
+ # Whether to forward disallowed and missing resources from this location to the app. A string is a path
+ # with a leading / to the controller, such as /index.php.
+ passthru: "/index.php"
+ # Files to consider when serving a request for a directory.
+ index:
+ - index.php
+ # Whether to allow scripts to run. Doesn’t apply to paths specified in passthru. Meaningful only on PHP containers.
+ scripts: true
+ # Whether to allow serving files which don’t match a rule.
+ allow: false
+ # The key of each item in rules is a regular expression to match paths exactly. If an incoming request
+ # matches the rule, it’s handled by the properties under the rule, overriding any conflicting rules from the
+ # rest of the locations properties.
+ # More information: https://docs.platform.sh/create-apps/app-reference.html#rules
+ rules:
+ \.(css|js|map|hbs|gif|jpe?g|png|tiff|wbmp|ico|jng|bmp|svgz|midi?|mp?ga|mp2|mp3|m4a|ra|weba|3gpp?|mp4|mpe?g|mpe|ogv|mov|webm|flv|mng|asx|asf|wmv|avi|ogx|swf|jar|ttf|eot|woff|otf|html?)$:
+ allow: true
+ ^/sitemap(.*)\.xml$:
+ passthru: "/media/sitemap$1.xml"
+ '/media':
+ root: "pub/media"
+ allow: true
+ scripts: false
+ passthru: "/get.php"
+ expires: 1y
+ '/static':
+ root: "pub/static"
+ allow: true
+ scripts: false
+ passthru: "/static.php"
+ expires: 1y
+ rules:
+ ^/static/version\d+/(?.*)$:
+ passthru: "/static/$resource"
+
+# Alternate copies of the application to run as background processes.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#workers
+workers:
+ queue:
+ size: S
+ disk: 128
+ commands:
+ start: |
+ bin/magento queue:consumers:start async.operations.all --single-thread --max-messages=10000
+
+# Variables to control the environment. More information: https://docs.platform.sh/create-apps/app-reference.html#variables
+variables:
+ # Customize your PHP.ini.
+ # See: https://docs.platform.sh/languages/php/ini.html
+ php:
+ # Include Magento's out-of-the-box settings
+ include: /app/.user.ini
-# The hooks executed at various points in the lifecycle of the application.
+# 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
+build:
+ flavor: composer
+
+# 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: "^1"
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
build: |
set -e
- php ./vendor/bin/ece-tools build:generate
- php ./vendor/bin/ece-tools build:transfer
+ mkdir -p .versioned_backup/etc && cp app/etc/* .versioned_backup/etc/
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
deploy: |
set -e
- php ./vendor/bin/ece-tools deploy -vvv
- post_deploy: |
- set -e
- php ./vendor/bin/ece-tools post-deploy -vvv
- php bin/magento admin:user:create --admin-user=admin --admin-password=admin --admin-email=admin@example.com --admin-firstname=Admin --admin-lastname=Istrator
+ cp .versioned_backup/etc/* app/etc/
+ php deploy.php
-# The configuration of scheduled execution.
+# Scheduled tasks for the app.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#crons
crons:
- magento:
- spec: "*/5 * * * *"
- commands: bash -c 'for group in $(grep -shoP "(?<=)" {app,vendor}/*/*/etc/cron_groups.xml); do echo -n Running cron group ${group} --- && php -d memory_limit=-1 bin/magento cron:run --group=${group}; done'
- logrotate:
- spec: "45 1 * * *"
- commands: shtool rotate -n10 $PLATFORM_APP_DIR/var/log/*.log
- reportcleanup:
- spec: "0 2 * * *"
- commands: find $PLATFORM_APP_DIR/var/report/* -mtime +10 -delete
+ magento:
+ spec: "*/5 * * * *"
+ commands:
+ start: "php bin/magento cron:run"
-# The configuration of app when it is exposed to the web.
-web:
- locations:
- "/":
- # The public directory of the app, relative to its root.
- root: "pub"
- # The front-controller script to send non-static requests to.
- passthru: "/index.php"
- index:
- - index.php
- expires: -1
- scripts: true
- allow: false
- rules:
- \.(css|js|map|hbs|gif|jpe?g|png|tiff|wbmp|ico|jng|bmp|svgz|midi?|mp?ga|mp2|mp3|m4a|ra|weba|3gpp?|mp4|mpe?g|mpe|ogv|mov|webm|flv|mng|asx|asf|wmv|avi|ogx|swf|jar|ttf|eot|woff|otf|html?)$:
- allow: true
- "/media":
- root: "pub/media"
- allow: true
- scripts: false
- expires: 1y
- passthru: "/get.php"
- "/static":
- root: "pub/static"
- allow: true
- scripts: false
- expires: 1y
- passthru: "/front-static.php"
- rules:
- ^/static/version\d+/(?.*)$:
- passthru: "/static/$resource"
+###
+# Customizations to your PHP or Lisp runtime. More information: https://docs.platform.sh/create-apps/app-reference.html#runtime
+# Specify additional PHP extensions that should be loaded.
+# To determine what you need to enable
+# 1. run locally: composer check-platform-reqs | grep "ext-\|php"
+# 2. Compare to https://docs.platform.sh/languages/php/extensions.html
+# - "Def" = Already Enabled
+# - "Avail" = Available, but you need to enable below.
+runtime:
+ extensions:
+ - xsl
+ - sodium
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
+source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
+ operations:
+ auto-update:
+ command: |
+ curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
diff --git a/templates/magento2ce/files/.platform/routes.yaml b/templates/magento2ce/files/.platform/routes.yaml
index 09f9d202f..c214ff3b7 100644
--- a/templates/magento2ce/files/.platform/routes.yaml
+++ b/templates/magento2ce/files/.platform/routes.yaml
@@ -1,3 +1,9 @@
+# The routes of the project.
+#
+# Each route describes how an incoming URL is going
+# to be processed by Platform.sh.
+# More information: https://docs.platform.sh/define-routes.html
https://{default}/:
- type: upstream
- upstream: app:http
+ id: magento_route
+ type: upstream
+ upstream: magento:http
diff --git a/templates/magento2ce/files/.platform/services.yaml b/templates/magento2ce/files/.platform/services.yaml
index 7cab9755b..f56f8f1f4 100644
--- a/templates/magento2ce/files/.platform/services.yaml
+++ b/templates/magento2ce/files/.platform/services.yaml
@@ -1,14 +1,27 @@
-db:
- type: mysql:10.4
- disk: 1500
+# The services of the project.
+#
+# Each service listed will be deployed
+# to power your Platform.sh project.
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
-cache:
- type: redis:6.0
+# Magento's Database
+magento_database:
+ type: mariadb:10.3
+ disk: 2048
-indexer:
- type: elasticsearch:7.9
- disk: 512
+# Magento's cache & session redis instance
+# Since our sessions will be sent here, we want to enable persistence so customers are not logged out when we deploy
+magento_redis:
+ type: redis-persistent:6.0
+ disk: 256
-queue:
- type: rabbitmq:3.8
- disk: 1024
+# Magento's Elasticsearch-compatible OpenSearch instance.
+magento_search:
+ # Magento 2.3.7 is also compatible with elasticsearch:7.9
+ type: opensearch:1.2
+ disk: 256
+ configuration:
+ plugins:
+ - analysis-icu
+ - analysis-phonetic
diff --git a/templates/nextjs/files/.gitignore b/templates/nextjs/files/.gitignore
deleted file mode 100644
index 1437c53f7..000000000
--- a/templates/nextjs/files/.gitignore
+++ /dev/null
@@ -1,34 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.js
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-
-# local env files
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
-
-# vercel
-.vercel
diff --git a/templates/nextjs/files/.platform.app.yaml b/templates/nextjs/files/.platform.app.yaml
index 038fcae8e..dece386df 100644
--- a/templates/nextjs/files/.platform.app.yaml
+++ b/templates/nextjs/files/.platform.app.yaml
@@ -1,53 +1,77 @@
-# .platform.app.yaml
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this application, which must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
-# The type key specifies the language and version for your application.
-type: "nodejs:14"
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: 'nodejs:18'
-dependencies:
- nodejs:
- yarn: "^1.22.0"
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 512
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
+mounts:
+ # Next.js will try to cache files, so it must be writeable.
+ '/.next':
+ source: local
+ source_path: 'next'
+
+# 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.
+ start: npx next start -p $PORT
+
+# 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
build:
flavor: none
-# The hooks that will be triggered when the package is deployed.
+# 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:
+ nodejs:
+ yarn: "^1.22.0"
+
+# 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 yarn has been downloaded.
- # No services are available but the disk is writeable.
+ # The build hook is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
build: |
yarn
yarn build
# Move committed files in soon-to-be mounts into temp directory.
chmod +x handle_mounts.sh
./handle_mounts.sh
- # 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.
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
deploy: |
# Move committed files from temp directory back into mounts.
./handle_mounts.sh
-# The configuration of the application when it is exposed to the web.
-web:
- commands:
- start: node server.js
-
-# The size of the persistent disk of the application (in MB).
-disk: 512
-
-# The mounts that will be performed when the package is deployed.
-mounts:
- # Next.js will try to cache files, so it must be writeable.
- "/.next/cache":
- source: local
- source_path: "next-cache"
-
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
- operations:
- auto-update:
- command: |
- curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
+ operations:
+ auto-update:
+ command: |
+ curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
diff --git a/templates/nextjs/files/.platform/routes.yaml b/templates/nextjs/files/.platform/routes.yaml
index 83b9bbff3..953b02779 100644
--- a/templates/nextjs/files/.platform/routes.yaml
+++ b/templates/nextjs/files/.platform/routes.yaml
@@ -2,11 +2,13 @@
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
-
+# More information: https://docs.platform.sh/define-routes.html
"https://www.{default}/":
type: upstream
upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://{default}/":
type: redirect
- to: "https://www.{default}/"
\ No newline at end of file
+ to: "https://www.{default}/"
diff --git a/templates/nextjs/files/README.md b/templates/nextjs/files/README.md
deleted file mode 100644
index cc2818358..000000000
--- a/templates/nextjs/files/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Next.js for Platform.sh
-
-
-
-This template builds a simple application using the NuxtJS web framework that can be used a starting point.
-
-NuxtJS is an open-source web framework based on Vue.js.
-
-## Features
-
-* Node.js 14
-* Automatic TLS certificates
-* yarn-based build
-
-## Customizations
-
-The following files and additions make the framework work on Platform.sh, modified from the `npx` command [`create-nuxt-app`](https://github.com/nuxt/create-nuxt-app). If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* An additional module, [`config-reader-nodejs`](https://github.com/platformsh/config-reader-nodejs), has been added. It provides convenience wrappers for accessing the Platform.sh environment variables.
-
-## References
-
-* [NuxtJS](https://nuxtjs.org/)
-* [Node.js on Platform.sh](https://docs.platform.sh/languages/nodejs.html)
diff --git a/templates/pyramid/files/.editorconfig b/templates/pyramid/files/.editorconfig
deleted file mode 100644
index 2a6fe3d48..000000000
--- a/templates/pyramid/files/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-; This file is for unifying the coding style for different editors and IDEs.
-; More information at http://editorconfig.org
-
-root = true
-
-[*]
-charset = utf-8
-indent_size = 4
-indent_style = space
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true
\ No newline at end of file
diff --git a/templates/pyramid/files/.gitignore b/templates/pyramid/files/.gitignore
deleted file mode 100644
index a69711e17..000000000
--- a/templates/pyramid/files/.gitignore
+++ /dev/null
@@ -1,111 +0,0 @@
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-wheels/
-*.egg-info/
-.installed.cfg
-*.egg
-MANIFEST
-
-# PyInstaller
-# Usually these files are written by a python script from a template
-# before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*.cover
-.hypothesis/
-.pytest_cache/
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-.static_storage/
-.media/
-local_settings.py
-
-# Flask stuff:
-instance/
-.webassets-cache
-
-# Scrapy stuff:
-.scrapy
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# pyenv
-.python-version
-
-# celery beat schedule file
-celerybeat-schedule
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
-.env
-.venv
-env/
-venv/
-ENV/
-env.bak/
-venv.bak/
-
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
-.platform/local
-
-# Local
-_www
-.idea/*
-.platform/local/*
diff --git a/templates/pyramid/files/.platform.app.yaml b/templates/pyramid/files/.platform.app.yaml
index 3a1d83058..47a4a6af8 100644
--- a/templates/pyramid/files/.platform.app.yaml
+++ b/templates/pyramid/files/.platform.app.yaml
@@ -1,42 +1,64 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
# The runtime the application uses.
-type: "python:3.8"
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: "python:3.9"
-# The build-time dependencies of the app.
-dependencies:
- python:
- pipenv: "2018.10.13"
-
-# The hooks executed at various points in the lifecycle of the application.
-hooks:
- build: |
- pipenv install --system --deploy
-# The size of the persistent disk of the application (in MB).
-disk: 1024
# 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"
+ database: "db:mysql"
+ redis: "cache:redis"
+
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 1024
-# The configuration of app when it is exposed to the web.
+# 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:
- start: python app.py
+ # 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.
+ start: python app.py
+# 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:
+ python:
+ pipenv: "2018.10.13"
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ pipenv install --system --deploy
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
curl -fsS https://raw.githubusercontent.com/platformsh/source-operations/main/setup.sh | { bash /dev/fd/3 sop-autoupdate; } 3<&0
-
+
diff --git a/templates/pyramid/files/.platform/routes.yaml b/templates/pyramid/files/.platform/routes.yaml
index ff74ad9b6..2e5319ae5 100644
--- a/templates/pyramid/files/.platform/routes.yaml
+++ b/templates/pyramid/files/.platform/routes.yaml
@@ -1,13 +1,14 @@
# The routes of the project.
#
-# Each route describes how an incoming URL is going to be processed by Platform.sh.
-#
-# See https://docs.platform.sh/user_guide/reference/routes-yaml.html
-
+# Each route describes how an incoming URL is going
+# to be processed by Platform.sh.
+# More information: https://docs.platform.sh/define-routes.html
"https://{default}/":
type: upstream
upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://www.{default}/":
type: redirect
to: "https://{default}/"
diff --git a/templates/pyramid/files/.platform/services.yaml b/templates/pyramid/files/.platform/services.yaml
index 11d8cb7ca..335458d31 100644
--- a/templates/pyramid/files/.platform/services.yaml
+++ b/templates/pyramid/files/.platform/services.yaml
@@ -1,3 +1,9 @@
+# The services of the project.
+#
+# Each service listed will be deployed
+# to power your Platform.sh project.
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
db:
type: "mariadb:10.4"
disk: 2048
diff --git a/templates/pyramid/files/Pipfile b/templates/pyramid/files/Pipfile
deleted file mode 100644
index 75dff5ce7..000000000
--- a/templates/pyramid/files/Pipfile
+++ /dev/null
@@ -1,15 +0,0 @@
-[[source]]
-url = "https://pypi.org/simple"
-verify_ssl = true
-name = "pypi"
-
-[packages]
-pyramid = ">=2.0"
-platformshconfig = "~=2.0"
-redis = "*"
-pymysql = "*"
-
-[dev-packages]
-
-[requires]
-python_version = "3.9"
diff --git a/templates/pyramid/files/Pipfile.lock b/templates/pyramid/files/Pipfile.lock
deleted file mode 100644
index fa91ac2b8..000000000
--- a/templates/pyramid/files/Pipfile.lock
+++ /dev/null
@@ -1,236 +0,0 @@
-{
- "_meta": {
- "hash": {
- "sha256": "c10f3f95961f04b2019034d0fd41079de0833cd3f52a11f72893f8c87d48a629"
- },
- "pipfile-spec": 6,
- "requires": {
- "python_version": "3.9"
- },
- "sources": [
- {
- "name": "pypi",
- "url": "https://pypi.org/simple",
- "verify_ssl": true
- }
- ]
- },
- "default": {
- "deprecated": {
- "hashes": [
- "sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d",
- "sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.2.13"
- },
- "hupper": {
- "hashes": [
- "sha256:cd6f51b72c7587bc9bce8a65ecd025a1e95f1b03284519bfe91284d010316cd9",
- "sha256:f683850d62598c02faf3c7cdaaa727d8cbe3c5a2497a5737a8358386903b2601"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.10.3"
- },
- "pastedeploy": {
- "hashes": [
- "sha256:14923cfd6ad4281b570693afc278bab5076fbdd4cd15aa9d99b042d694aa4217",
- "sha256:6dead6ab9823a85d585ef27f878bc647f787edb9ca8da0716aa9f1261b464817"
- ],
- "version": "==2.1.1"
- },
- "plaster": {
- "hashes": [
- "sha256:215c921a438b5349931fd7df9a5a11a3572947f20f4bc6dd622ac08f1c3ba249",
- "sha256:8351c7c7efdf33084c1de88dd0f422cbe7342534537b553c49b857b12d98c8c3"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.0"
- },
- "plaster-pastedeploy": {
- "hashes": [
- "sha256:391d93a4e1ff81fc3bae27508ebb765b61f1724ae6169f83577f06b6357be7fd",
- "sha256:7c8aa37c917b615c70bf942b24dc1e0455c49f62f1a2214b1a0dd98871644bbb"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.7"
- },
- "platformshconfig": {
- "hashes": [
- "sha256:3eb95a514de57ce3341690fd3e0a61e6fa8c858a0793810a29fcce40691254a2",
- "sha256:ff1e29719d2789f6d164e1abd42dbecec1c535e5e741161ba177cec34bfdd6de"
- ],
- "index": "pypi",
- "version": "==2.4.0"
- },
- "pymysql": {
- "hashes": [
- "sha256:41fc3a0c5013d5f039639442321185532e3e2c8924687abe6537de157d403641",
- "sha256:816927a350f38d56072aeca5dfb10221fe1dc653745853d30a216637f5d7ad36"
- ],
- "index": "pypi",
- "version": "==1.0.2"
- },
- "pyramid": {
- "hashes": [
- "sha256:45431b387587ed0fac6213b54d6e9f0936f0cc85238a8f5af7852fc9484c5c77",
- "sha256:de7f097fa2fa43bead1f690761e56594d24954ae7dc7cbf69a5d84bb75c5a099"
- ],
- "index": "pypi",
- "version": "==2.0"
- },
- "redis": {
- "hashes": [
- "sha256:c8481cf414474e3497ec7971a1ba9b998c8efad0f0d289a009a5bbef040894f9",
- "sha256:ccf692811f2c1fc7a92b466aa2599e4a6d2d73d5f736a2c70be600657c0da34a"
- ],
- "index": "pypi",
- "version": "==4.0.2"
- },
- "translationstring": {
- "hashes": [
- "sha256:5f4dc4d939573db851c8d840551e1a0fb27b946afe3b95aafc22577eed2d6262",
- "sha256:bf947538d76e69ba12ab17283b10355a9ecfbc078e6123443f43f2107f6376f3"
- ],
- "version": "==1.4"
- },
- "venusian": {
- "hashes": [
- "sha256:06e7385786ad3a15c70740b2af8d30dfb063a946a851dcb4159f9e2a2302578f",
- "sha256:f6842b7242b1039c0c28f6feef29016e7e7dd3caaeb476a193acf737db31ee38"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==3.0.0"
- },
- "webob": {
- "hashes": [
- "sha256:73aae30359291c14fa3b956f8b5ca31960e420c28c1bec002547fb04928cf89b",
- "sha256:b64ef5141be559cfade448f044fa45c2260351edcb6a8ef6b7e00c7dcef0c323"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.8.7"
- },
- "wrapt": {
- "hashes": [
- "sha256:086218a72ec7d986a3eddb7707c8c4526d677c7b35e355875a0fe2918b059179",
- "sha256:0877fe981fd76b183711d767500e6b3111378ed2043c145e21816ee589d91096",
- "sha256:0a017a667d1f7411816e4bf214646d0ad5b1da2c1ea13dec6c162736ff25a374",
- "sha256:0cb23d36ed03bf46b894cfec777eec754146d68429c30431c99ef28482b5c1df",
- "sha256:1fea9cd438686e6682271d36f3481a9f3636195578bab9ca3382e2f5f01fc185",
- "sha256:220a869982ea9023e163ba915077816ca439489de6d2c09089b219f4e11b6785",
- "sha256:25b1b1d5df495d82be1c9d2fad408f7ce5ca8a38085e2da41bb63c914baadff7",
- "sha256:2dded5496e8f1592ec27079b28b6ad2a1ef0b9296d270f77b8e4a3a796cf6909",
- "sha256:2ebdde19cd3c8cdf8df3fc165bc7827334bc4e353465048b36f7deeae8ee0918",
- "sha256:43e69ffe47e3609a6aec0fe723001c60c65305784d964f5007d5b4fb1bc6bf33",
- "sha256:46f7f3af321a573fc0c3586612db4decb7eb37172af1bc6173d81f5b66c2e068",
- "sha256:47f0a183743e7f71f29e4e21574ad3fa95676136f45b91afcf83f6a050914829",
- "sha256:498e6217523111d07cd67e87a791f5e9ee769f9241fcf8a379696e25806965af",
- "sha256:4b9c458732450ec42578b5642ac53e312092acf8c0bfce140ada5ca1ac556f79",
- "sha256:51799ca950cfee9396a87f4a1240622ac38973b6df5ef7a41e7f0b98797099ce",
- "sha256:5601f44a0f38fed36cc07db004f0eedeaadbdcec90e4e90509480e7e6060a5bc",
- "sha256:5f223101f21cfd41deec8ce3889dc59f88a59b409db028c469c9b20cfeefbe36",
- "sha256:610f5f83dd1e0ad40254c306f4764fcdc846641f120c3cf424ff57a19d5f7ade",
- "sha256:6a03d9917aee887690aa3f1747ce634e610f6db6f6b332b35c2dd89412912bca",
- "sha256:705e2af1f7be4707e49ced9153f8d72131090e52be9278b5dbb1498c749a1e32",
- "sha256:766b32c762e07e26f50d8a3468e3b4228b3736c805018e4b0ec8cc01ecd88125",
- "sha256:77416e6b17926d953b5c666a3cb718d5945df63ecf922af0ee576206d7033b5e",
- "sha256:778fd096ee96890c10ce96187c76b3e99b2da44e08c9e24d5652f356873f6709",
- "sha256:78dea98c81915bbf510eb6a3c9c24915e4660302937b9ae05a0947164248020f",
- "sha256:7dd215e4e8514004c8d810a73e342c536547038fb130205ec4bba9f5de35d45b",
- "sha256:7dde79d007cd6dfa65afe404766057c2409316135cb892be4b1c768e3f3a11cb",
- "sha256:81bd7c90d28a4b2e1df135bfbd7c23aee3050078ca6441bead44c42483f9ebfb",
- "sha256:85148f4225287b6a0665eef08a178c15097366d46b210574a658c1ff5b377489",
- "sha256:865c0b50003616f05858b22174c40ffc27a38e67359fa1495605f96125f76640",
- "sha256:87883690cae293541e08ba2da22cacaae0a092e0ed56bbba8d018cc486fbafbb",
- "sha256:8aab36778fa9bba1a8f06a4919556f9f8c7b33102bd71b3ab307bb3fecb21851",
- "sha256:8c73c1a2ec7c98d7eaded149f6d225a692caa1bd7b2401a14125446e9e90410d",
- "sha256:936503cb0a6ed28dbfa87e8fcd0a56458822144e9d11a49ccee6d9a8adb2ac44",
- "sha256:944b180f61f5e36c0634d3202ba8509b986b5fbaf57db3e94df11abee244ba13",
- "sha256:96b81ae75591a795d8c90edc0bfaab44d3d41ffc1aae4d994c5aa21d9b8e19a2",
- "sha256:981da26722bebb9247a0601e2922cedf8bb7a600e89c852d063313102de6f2cb",
- "sha256:ae9de71eb60940e58207f8e71fe113c639da42adb02fb2bcbcaccc1ccecd092b",
- "sha256:b73d4b78807bd299b38e4598b8e7bd34ed55d480160d2e7fdaabd9931afa65f9",
- "sha256:d4a5f6146cfa5c7ba0134249665acd322a70d1ea61732723c7d3e8cc0fa80755",
- "sha256:dd91006848eb55af2159375134d724032a2d1d13bcc6f81cd8d3ed9f2b8e846c",
- "sha256:e05e60ff3b2b0342153be4d1b597bbcfd8330890056b9619f4ad6b8d5c96a81a",
- "sha256:e6906d6f48437dfd80464f7d7af1740eadc572b9f7a4301e7dd3d65db285cacf",
- "sha256:e92d0d4fa68ea0c02d39f1e2f9cb5bc4b4a71e8c442207433d8db47ee79d7aa3",
- "sha256:e94b7d9deaa4cc7bac9198a58a7240aaf87fe56c6277ee25fa5b3aa1edebd229",
- "sha256:ea3e746e29d4000cd98d572f3ee2a6050a4f784bb536f4ac1f035987fc1ed83e",
- "sha256:ec7e20258ecc5174029a0f391e1b948bf2906cd64c198a9b8b281b811cbc04de",
- "sha256:ec9465dd69d5657b5d2fa6133b3e1e989ae27d29471a672416fd729b429eb554",
- "sha256:f122ccd12fdc69628786d0c947bdd9cb2733be8f800d88b5a37c57f1f1d73c10",
- "sha256:f99c0489258086308aad4ae57da9e8ecf9e1f3f30fa35d5e170b4d4896554d80",
- "sha256:f9c51d9af9abb899bd34ace878fbec8bf357b3194a10c4e8e0a25512826ef056",
- "sha256:fd76c47f20984b43d93de9a82011bb6e5f8325df6c9ed4d8310029a55fa361ea"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
- "version": "==1.13.3"
- },
- "zope.deprecation": {
- "hashes": [
- "sha256:0d453338f04bacf91bbfba545d8bcdf529aa829e67b705eac8c1a7fdce66e2df",
- "sha256:f1480b74995958b24ce37b0ef04d3663d2683e5d6debc96726eff18acf4ea113"
- ],
- "version": "==4.4.0"
- },
- "zope.interface": {
- "hashes": [
- "sha256:08f9636e99a9d5410181ba0729e0408d3d8748026ea938f3b970a0249daa8192",
- "sha256:0b465ae0962d49c68aa9733ba92a001b2a0933c317780435f00be7ecb959c702",
- "sha256:0cba8477e300d64a11a9789ed40ee8932b59f9ee05f85276dbb4b59acee5dd09",
- "sha256:0cee5187b60ed26d56eb2960136288ce91bcf61e2a9405660d271d1f122a69a4",
- "sha256:0ea1d73b7c9dcbc5080bb8aaffb776f1c68e807767069b9ccdd06f27a161914a",
- "sha256:0f91b5b948686659a8e28b728ff5e74b1be6bf40cb04704453617e5f1e945ef3",
- "sha256:15e7d1f7a6ee16572e21e3576d2012b2778cbacf75eb4b7400be37455f5ca8bf",
- "sha256:17776ecd3a1fdd2b2cd5373e5ef8b307162f581c693575ec62e7c5399d80794c",
- "sha256:194d0bcb1374ac3e1e023961610dc8f2c78a0f5f634d0c737691e215569e640d",
- "sha256:1c0e316c9add0db48a5b703833881351444398b04111188069a26a61cfb4df78",
- "sha256:205e40ccde0f37496904572035deea747390a8b7dc65146d30b96e2dd1359a83",
- "sha256:273f158fabc5ea33cbc936da0ab3d4ba80ede5351babc4f577d768e057651531",
- "sha256:2876246527c91e101184f63ccd1d716ec9c46519cc5f3d5375a3351c46467c46",
- "sha256:2c98384b254b37ce50eddd55db8d381a5c53b4c10ee66e1e7fe749824f894021",
- "sha256:2e5a26f16503be6c826abca904e45f1a44ff275fdb7e9d1b75c10671c26f8b94",
- "sha256:334701327f37c47fa628fc8b8d28c7d7730ce7daaf4bda1efb741679c2b087fc",
- "sha256:3748fac0d0f6a304e674955ab1365d515993b3a0a865e16a11ec9d86fb307f63",
- "sha256:3c02411a3b62668200910090a0dff17c0b25aaa36145082a5a6adf08fa281e54",
- "sha256:3dd4952748521205697bc2802e4afac5ed4b02909bb799ba1fe239f77fd4e117",
- "sha256:3f24df7124c323fceb53ff6168da70dbfbae1442b4f3da439cd441681f54fe25",
- "sha256:469e2407e0fe9880ac690a3666f03eb4c3c444411a5a5fddfdabc5d184a79f05",
- "sha256:4de4bc9b6d35c5af65b454d3e9bc98c50eb3960d5a3762c9438df57427134b8e",
- "sha256:5208ebd5152e040640518a77827bdfcc73773a15a33d6644015b763b9c9febc1",
- "sha256:52de7fc6c21b419078008f697fd4103dbc763288b1406b4562554bd47514c004",
- "sha256:5bb3489b4558e49ad2c5118137cfeaf59434f9737fa9c5deefc72d22c23822e2",
- "sha256:5dba5f530fec3f0988d83b78cc591b58c0b6eb8431a85edd1569a0539a8a5a0e",
- "sha256:5dd9ca406499444f4c8299f803d4a14edf7890ecc595c8b1c7115c2342cadc5f",
- "sha256:5f931a1c21dfa7a9c573ec1f50a31135ccce84e32507c54e1ea404894c5eb96f",
- "sha256:63b82bb63de7c821428d513607e84c6d97d58afd1fe2eb645030bdc185440120",
- "sha256:66c0061c91b3b9cf542131148ef7ecbecb2690d48d1612ec386de9d36766058f",
- "sha256:6f0c02cbb9691b7c91d5009108f975f8ffeab5dff8f26d62e21c493060eff2a1",
- "sha256:71aace0c42d53abe6fc7f726c5d3b60d90f3c5c055a447950ad6ea9cec2e37d9",
- "sha256:7d97a4306898b05404a0dcdc32d9709b7d8832c0c542b861d9a826301719794e",
- "sha256:7df1e1c05304f26faa49fa752a8c690126cf98b40b91d54e6e9cc3b7d6ffe8b7",
- "sha256:8270252effc60b9642b423189a2fe90eb6b59e87cbee54549db3f5562ff8d1b8",
- "sha256:867a5ad16892bf20e6c4ea2aab1971f45645ff3102ad29bd84c86027fa99997b",
- "sha256:877473e675fdcc113c138813a5dd440da0769a2d81f4d86614e5d62b69497155",
- "sha256:8892f89999ffd992208754851e5a052f6b5db70a1e3f7d54b17c5211e37a98c7",
- "sha256:9a9845c4c6bb56e508651f005c4aeb0404e518c6f000d5a1123ab077ab769f5c",
- "sha256:a1e6e96217a0f72e2b8629e271e1b280c6fa3fe6e59fa8f6701bec14e3354325",
- "sha256:a8156e6a7f5e2a0ff0c5b21d6bcb45145efece1909efcbbbf48c56f8da68221d",
- "sha256:a9506a7e80bcf6eacfff7f804c0ad5350c8c95b9010e4356a4b36f5322f09abb",
- "sha256:af310ec8335016b5e52cae60cda4a4f2a60a788cbb949a4fbea13d441aa5a09e",
- "sha256:b0297b1e05fd128d26cc2460c810d42e205d16d76799526dfa8c8ccd50e74959",
- "sha256:bf68f4b2b6683e52bec69273562df15af352e5ed25d1b6641e7efddc5951d1a7",
- "sha256:d0c1bc2fa9a7285719e5678584f6b92572a5b639d0e471bb8d4b650a1a910920",
- "sha256:d4d9d6c1a455d4babd320203b918ccc7fcbefe308615c521062bc2ba1aa4d26e",
- "sha256:db1fa631737dab9fa0b37f3979d8d2631e348c3b4e8325d6873c2541d0ae5a48",
- "sha256:dd93ea5c0c7f3e25335ab7d22a507b1dc43976e1345508f845efc573d3d779d8",
- "sha256:f44e517131a98f7a76696a7b21b164bcb85291cee106a23beccce454e1f433a4",
- "sha256:f7ee479e96f7ee350db1cf24afa5685a5899e2b34992fb99e1f7c1b0b758d263"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
- "version": "==5.4.0"
- }
- },
- "develop": {}
-}
diff --git a/templates/pyramid/files/README.md b/templates/pyramid/files/README.md
deleted file mode 100644
index ed37e5c3c..000000000
--- a/templates/pyramid/files/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Pyramid for Platform.sh
-
-
-
-This template builds Pyramid on Platform.sh. It includes a minimalist application skeleton that demonstrates how to connect to a MariaDB server for data storage and Redis for caching. It is intended for you to use as a starting point and modify for your own needs.
-
-Pyramid is a web framework written in Python.
-
-## Features
-
-* Python 3.8
-* MariaDB 10.4
-* Redis 5.0
-* Automatic TLS certificates
-* Pipfile-based build
-
-## Post-installation
-
-The `app.py` file includes example controllers that demonstrate accessing services within the application. Feel free to replace them with your own code as appropriate.
-
-## Customizations
-
-The following changes have been made relative to Pyramid as it is downloaded from the Pyramid website. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-
-## References
-
-* [Pyramid](https://trypyramid.com/)
-* [Python on Platform.sh](https://docs.platform.sh/languages/python.html)
diff --git a/templates/pyramid/files/app.py b/templates/pyramid/files/app.py
deleted file mode 100644
index 2065f7330..000000000
--- a/templates/pyramid/files/app.py
+++ /dev/null
@@ -1,81 +0,0 @@
-import sys
-import uuid
-import traceback
-
-import redis
-import pymysql
-from wsgiref.simple_server import make_server
-from pyramid.config import Configurator
-from pyramid.response import Response
-
-import platformshconfig
-
-
-pshconfig = platformshconfig.Config()
-
-
-def hello_world(request):
-
- tests = {
- "database": wrap_test(test_mysql, pshconfig.credentials("database")),
- "redis": wrap_test(test_redis, pshconfig.credentials("redis"))
- }
-
- return Response(str(tests))
-
-
-def wrap_test(callback, *args, **kwargs):
- try:
- result = callback(*args, **kwargs)
- return {
- "status": "OK",
- "return": result,
- }
- except Exception:
- return {
- "status": "ERROR",
- "error": traceback.format_exception(*sys.exc_info())
- }
-
-
-def test_mysql(instance):
- connection = pymysql.connect(
- host=instance["host"],
- port=instance["port"],
- user=instance["username"],
- password=instance["password"],
- db=instance["path"],
- charset='utf8mb4',
- cursorclass=pymysql.cursors.DictCursor,
- )
-
- try:
- with connection.cursor() as cursor:
- cursor.execute("SELECT 1")
- cursor.fetchone()
-
- finally:
- connection.close()
-
-
-def test_redis(instance):
- r = redis.StrictRedis(
- host=instance["host"],
- port=instance["port"],
- db=0,
- )
- key_name = "foo-%s" + str(uuid.uuid4())
- value = b"bar"
-
- r.set(key_name, "bar")
- assert value == r.get(key_name)
-
-
-if __name__ == '__main__':
- with Configurator() as config:
- config.add_route('hello', '/')
- config.add_view(hello_world, route_name='hello')
- app = config.make_wsgi_app()
-
- server = make_server('127.0.0.1', int(pshconfig.port), app)
- server.serve_forever()
diff --git a/templates/strapi4/files/.editorconfig b/templates/strapi4/files/.editorconfig
deleted file mode 100644
index 473e45184..000000000
--- a/templates/strapi4/files/.editorconfig
+++ /dev/null
@@ -1,16 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
-
-[{package.json,*.yml}]
-indent_style = space
-indent_size = 2
-
-[*.md]
-trim_trailing_whitespace = false
diff --git a/templates/strapi4/files/.env.example b/templates/strapi4/files/.env.example
deleted file mode 100644
index b667b6c4a..000000000
--- a/templates/strapi4/files/.env.example
+++ /dev/null
@@ -1,2 +0,0 @@
-HOST=0.0.0.0
-PORT=1337
diff --git a/templates/strapi4/files/.environment b/templates/strapi4/files/.environment
deleted file mode 100644
index 7d1b4a580..000000000
--- a/templates/strapi4/files/.environment
+++ /dev/null
@@ -1,2 +0,0 @@
-export JWT_SECRET="$PLATFORM_PROJECT_ENTROPY"
-export API_TOKEN_SALT="$PLATFORM_PROJECT_ENTROPY"
diff --git a/templates/strapi4/files/.eslintignore b/templates/strapi4/files/.eslintignore
deleted file mode 100644
index 90759a584..000000000
--- a/templates/strapi4/files/.eslintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.cache
-build
-**/node_modules/**
diff --git a/templates/strapi4/files/.eslintrc b/templates/strapi4/files/.eslintrc
deleted file mode 100644
index b2ca93b1a..000000000
--- a/templates/strapi4/files/.eslintrc
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "parser": "babel-eslint",
- "extends": "eslint:recommended",
- "env": {
- "commonjs": true,
- "es6": true,
- "node": true,
- "browser": false
- },
- "parserOptions": {
- "ecmaFeatures": {
- "experimentalObjectRestSpread": true,
- "jsx": false
- },
- "sourceType": "module"
- },
- "globals": {
- "strapi": true
- },
- "rules": {
- "indent": ["error", 2, { "SwitchCase": 1 }],
- "linebreak-style": ["error", "unix"],
- "no-console": 0,
- "quotes": ["error", "single"],
- "semi": ["error", "always"]
- }
-}
diff --git a/templates/strapi4/files/.gitignore b/templates/strapi4/files/.gitignore
deleted file mode 100644
index a3f620ece..000000000
--- a/templates/strapi4/files/.gitignore
+++ /dev/null
@@ -1,113 +0,0 @@
-############################
-# OS X
-############################
-
-.DS_Store
-.AppleDouble
-.LSOverride
-Icon
-.Spotlight-V100
-.Trashes
-._*
-
-
-############################
-# Linux
-############################
-
-*~
-
-
-############################
-# Windows
-############################
-
-Thumbs.db
-ehthumbs.db
-Desktop.ini
-$RECYCLE.BIN/
-*.cab
-*.msi
-*.msm
-*.msp
-
-
-############################
-# Packages
-############################
-
-*.7z
-*.csv
-*.dat
-*.dmg
-*.gz
-*.iso
-*.jar
-*.rar
-*.tar
-*.zip
-*.com
-*.class
-*.dll
-*.exe
-*.o
-*.seed
-*.so
-*.swo
-*.swp
-*.swn
-*.swm
-*.out
-*.pid
-
-
-############################
-# Logs and databases
-############################
-
-.tmp
-*.log
-*.sql
-*.sqlite
-*.sqlite3
-
-
-############################
-# Misc.
-############################
-
-*#
-ssl
-.idea
-nbproject
-public/uploads/*
-!public/uploads/.gitkeep
-
-############################
-# Node.js
-############################
-
-lib-cov
-lcov.info
-pids
-logs
-results
-node_modules
-.node_history
-
-############################
-# Tests
-############################
-
-testApp
-coverage
-
-############################
-# Strapi
-############################
-.env
-license.txt
-exports
-*.cache
-build
-.strapi-updater.json
diff --git a/templates/strapi4/files/.platform.app.yaml b/templates/strapi4/files/.platform.app.yaml
index 1e874da1f..86535e10f 100644
--- a/templates/strapi4/files/.platform.app.yaml
+++ b/templates/strapi4/files/.platform.app.yaml
@@ -1,48 +1,26 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
-#
-# See https://docs.platform.sh/configuration/app.html
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
-# The runtime the application uses. Strapi not yet suppported with NodeJS 14.
-type: nodejs:12
-
-# Use Yarn instead of npm.
-build:
- flavor: none
-
-# Build dependencies.
-dependencies:
- nodejs:
- yarn: "1.22.5"
-
-# The hooks executed at various points in the lifecycle of the application.
-hooks:
- build: |
- # Download dependencies and build Strapi.
- yarn --frozen-lockfile
- yarn build
+# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: nodejs:18
# 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:
postgresdatabase: "dbpostgres:postgresql"
-# The configuration of app when it is exposed to the web.
-web:
- commands:
- start: |
- # Production start on all environments
- NODE_ENV=production yarn start
-
-# The size of the persistent disk of the application (in MB).
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
disk: 1024
-# The 'mounts' describe writable, persistent filesystem mounts in the application.
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
mounts:
# Strapi's cache directory.
"/.cache":
@@ -69,7 +47,53 @@ mounts:
source: local
source_path: uploads
+# 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.
+ start: |
+ # Production start on all environments
+ NODE_ENV=production yarn start
+
+# 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
+build:
+ # Use Yarn instead of npm.
+ flavor: none
+
+# 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:
+ nodejs:
+ yarn: "1.22.5"
+
+# 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 is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ # Download dependencies and build Strapi.
+ yarn --frozen-lockfile
+ yarn build
+
+# Information on the app's source code and operations that can be run on it.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#source
source:
+ ######################################################################################################################
+ ## ##
+ ## This source operation is part of the Platform.sh process of updating and maintaining our collection of ##
+ ## templates. For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+ ## https://github.com/platformsh/source-operations ##
+ ## ##
+ ## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+ ## ##
+ ######################################################################################################################
operations:
auto-update:
command: |
diff --git a/templates/strapi4/files/.platform/routes.yaml b/templates/strapi4/files/.platform/routes.yaml
index 12f1d80f1..d50710e87 100644
--- a/templates/strapi4/files/.platform/routes.yaml
+++ b/templates/strapi4/files/.platform/routes.yaml
@@ -2,11 +2,13 @@
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.
-
+# More information: https://docs.platform.sh/define-routes.html
"https://www.{default}/":
- type: upstream
- upstream: "app:http"
+ type: upstream
+ upstream: "app:http"
+# A basic redirect definition
+# More information: https://docs.platform.sh/define-routes.html#basic-redirect-definition
"https://{default}/":
- type: redirect
- to: "https://www.{default}/"
+ type: redirect
+ to: "https://www.{default}/"
diff --git a/templates/strapi4/files/.platform/services.yaml b/templates/strapi4/files/.platform/services.yaml
index 927f29ae7..01e7f9206 100644
--- a/templates/strapi4/files/.platform/services.yaml
+++ b/templates/strapi4/files/.platform/services.yaml
@@ -2,10 +2,11 @@
#
# Each service listed will be deployed
# to power your Platform.sh project.
-
+# More information: https://docs.platform.sh/add-services.html
+# Full list of available services: https://docs.platform.sh/add-services.html#available-services
dbpostgres:
- type: postgresql:12
- disk: 256
+ type: postgresql:12
+ disk: 256
# Uncomment the line below if you would like to use a mysql database
# dbmysql:
diff --git a/templates/strapi4/files/README.md b/templates/strapi4/files/README.md
deleted file mode 100644
index 6c8dd953c..000000000
--- a/templates/strapi4/files/README.md
+++ /dev/null
@@ -1,140 +0,0 @@
-# Strapi v4 template for Platform.sh
-
-
-
-This template builds the Wagtail CMS on Platform.sh, using the gunicorn application runner. It includes a PostgreSQL database that is configured automatically, and a basic demonstration app that shows how to use it. It is intended for you to use as a starting point and modify for your own needs. You will need to run the command line installation process by logging into the project over SSH after the first deploy.
-
-Wagtail is a web CMS built using the Django framework for Python.
-
-## Features
-
-* Python 3.9
-* PostgreSQL 12
-* Automatic TLS certificates
-* Pipfile-based build
-
-## Post-installation
-
-After installation, you will need to create the initial administrative user.
-
-1. SSH into the project using `platform ssh` (if you have checked out a copy of the repository), or using the SSH login URL provided in the web console.
-
-2. Run:
-
-```python
-python manage.py createsuperuser
-```
-
-That will create the initial user and provide you with the admin password.
-
-3. Login to the Wagtail admin section at the `/cms` URL for your project.
-
-## Customizations
-
-The following files have been added to a basic Django configuration. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* An additional Pip library, [`platformshconfig`](https://github.com/platformsh/config-reader-python), has been added. It provides convenience wrappers for accessing the Platform.sh environment variables.
-* A rudimentary `myapp` application is included for demonstration purposes. In particular, the `settings.py` file is set up to configure Django to connect to the correct database, and run in Debug mode when not running the `master` branch. You are free to change that configuration if you prefer.
-
-## References
-
-* [Wagtail](https://wagtail.io/)
-* [Python on Platform.sh](https://docs.platform.sh/languages/python.html)
diff --git a/templates/wagtail/files/manage.py b/templates/wagtail/files/manage.py
deleted file mode 100755
index ed184bffe..000000000
--- a/templates/wagtail/files/manage.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-import os
-import sys
-
-if __name__ == '__main__':
- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
- try:
- from django.core.management import execute_from_command_line
- except ImportError as exc:
- raise ImportError(
- "Couldn't import Django. Are you sure it's installed and "
- "available on your PYTHONPATH environment variable? Did you "
- "forget to activate a virtual environment?"
- ) from exc
- execute_from_command_line(sys.argv)
diff --git a/templates/wagtail/files/myapp/__init__.py b/templates/wagtail/files/myapp/__init__.py
deleted file mode 100644
index e69de29bb..000000000
diff --git a/templates/wagtail/files/myapp/settings.py b/templates/wagtail/files/myapp/settings.py
deleted file mode 100644
index 69110092c..000000000
--- a/templates/wagtail/files/myapp/settings.py
+++ /dev/null
@@ -1,182 +0,0 @@
-"""
-Django settings for myapp project.
-
-Generated by 'django-admin startproject' using Django 2.1.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/2.1/topics/settings/
-
-For the full list of settings and their values, see
-https://docs.djangoproject.com/en/2.1/ref/settings/
-"""
-
-import os
-import json
-import base64
-from urllib.parse import urlparse
-
-from platformshconfig import Config
-
-# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
-BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-# Quick-start development settings - unsuitable for production
-# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
-
-# SECURITY WARNING: keep the secret key used in production secret!
-SECRET_KEY = '5^#15wdl(qll2ue&&(-1ixwalo7%td1a(&x7abp(roabe_mk7w'
-
-# SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
-ALLOWED_HOSTS = ['*']
-
-
-# Application definition
-
-INSTALLED_APPS = [
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'wagtail.contrib.forms',
- 'wagtail.contrib.redirects',
- 'wagtail.embeds',
- 'wagtail.sites',
- 'wagtail.users',
- 'wagtail.snippets',
- 'wagtail.documents',
- 'wagtail.images',
- 'wagtail.search',
- 'wagtail.admin',
- 'wagtail.core',
-
- 'modelcluster',
- 'taggit',
-]
-
-MIDDLEWARE = [
- 'django.middleware.security.SecurityMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- 'wagtail.contrib.redirects.middleware.RedirectMiddleware',
-]
-
-ROOT_URLCONF = 'myapp.urls'
-
-TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
- 'APP_DIRS': True,
- 'OPTIONS': {
- 'context_processors': [
- 'django.template.context_processors.debug',
- 'django.template.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'django.contrib.messages.context_processors.messages',
- ],
- },
- },
-]
-
-WSGI_APPLICATION = 'myapp.wsgi.application'
-
-
-# Database
-# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
-
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
-}
-
-
-# Password validation
-# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
-
-AUTH_PASSWORD_VALIDATORS = [
- {
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
- },
- {
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
- },
-]
-
-
-# Internationalization
-# https://docs.djangoproject.com/en/2.1/topics/i18n/
-
-LANGUAGE_CODE = 'en-us'
-
-TIME_ZONE = 'UTC'
-
-USE_I18N = True
-
-USE_L10N = True
-
-USE_TZ = True
-
-
-# Static files (CSS, JavaScript, Images)
-# https://docs.djangoproject.com/en/2.1/howto/static-files/
-
-STATIC_URL = '/static/'
-
-MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
-MEDIA_URL = '/media/'
-
-WAGTAIL_SITE_NAME = 'Platform.sh Wagtail Demo'
-
-# Import some Platform.sh settings from the environment.
-
-config = Config()
-
-if config.appDir:
- STATIC_ROOT = os.path.join(config.appDir, 'static')
-if config.projectEntropy:
- SECRET_KEY = config.projectEntropy
-
-routes = os.getenv('PLATFORM_ROUTES')
-if routes:
- routes = json.loads(base64.b64decode(routes).decode('utf-8'))
- app_name = os.getenv('PLATFORM_APPLICATION_NAME')
- for url, route in routes.items():
- host = urlparse(url).netloc
- if (host not in ALLOWED_HOSTS and route['type'] == 'upstream'
- and route['upstream'] == app_name):
- ALLOWED_HOSTS.append(host)
-
-relationships = os.getenv('PLATFORM_RELATIONSHIPS')
-if relationships:
- relationships = json.loads(base64.b64decode(relationships).decode('utf-8'))
- db_settings = relationships['database'][0]
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.postgresql',
- 'NAME': db_settings['path'],
- 'USER': db_settings['username'],
- 'PASSWORD': db_settings['password'],
- 'HOST': db_settings['host'],
- 'PORT': db_settings['port'],
- },
- 'sqlite': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
- }
- }
diff --git a/templates/wagtail/files/myapp/urls.py b/templates/wagtail/files/myapp/urls.py
deleted file mode 100644
index a4069a344..000000000
--- a/templates/wagtail/files/myapp/urls.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""myapp URL Configuration
-
-The `urlpatterns` list routes URLs to views. For more information please see:
- https://docs.djangoproject.com/en/2.1/topics/http/urls/
-Examples:
-Function views
- 1. Add an import: from my_app import views
- 2. Add a URL to urlpatterns: path('', views.home, name='home')
-Class-based views
- 1. Add an import: from other_app.views import Home
- 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
-Including another URLconf
- 1. Import the include() function: from django.urls import include, path
- 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
-"""
-from django.contrib import admin
-from django.urls import path, re_path, include
-
-from wagtail.admin import urls as wagtailadmin_urls
-from wagtail.documents import urls as wagtaildocs_urls
-from wagtail.core import urls as wagtail_urls
-
-urlpatterns = [
- re_path(r'^cms/', include(wagtailadmin_urls)),
- re_path(r'^documents/', include(wagtaildocs_urls)),
- re_path(r'', include(wagtail_urls)),
-
-]
diff --git a/templates/wagtail/files/myapp/wsgi.py b/templates/wagtail/files/myapp/wsgi.py
deleted file mode 100644
index 964076461..000000000
--- a/templates/wagtail/files/myapp/wsgi.py
+++ /dev/null
@@ -1,16 +0,0 @@
-"""
-WSGI config for myapp project.
-
-It exposes the WSGI callable as a module-level variable named ``application``.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
-"""
-
-import os
-
-from django.core.wsgi import get_wsgi_application
-
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
-
-application = get_wsgi_application()
diff --git a/templates/wordpress-bedrock/files/.environment b/templates/wordpress-bedrock/files/.environment
deleted file mode 100644
index 242801ca5..000000000
--- a/templates/wordpress-bedrock/files/.environment
+++ /dev/null
@@ -1,20 +0,0 @@
-export DB_NAME=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].path")
-export DB_HOST=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].host")
-export DB_PORT=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].port")
-export DB_USER=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].username")
-export DB_PASSWORD=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].password")
-
-export WP_HOME=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.primary == true) | .key' | sed 's:/*$::')
-export WP_SITEURL="${WP_HOME}/wp"
-export WP_DEBUG_LOG=/var/log/app.log
-export WP_ENV=production
-# Uncomment this line if you would like development versions of WordPress on non-production environments.
-# export WP_ENV="${PLATFORM_ENVIRONMENT_TYPE}"
-export AUTH_KEY=$PLATFORM_PROJECT_ENTROPY
-export SECURE_AUTH_KEY=$PLATFORM_PROJECT_ENTROPY
-export LOGGED_IN_KEY=$PLATFORM_PROJECT_ENTROPY
-export NONCE_KEY=$PLATFORM_PROJECT_ENTROPY
-export AUTH_SALT=$PLATFORM_PROJECT_ENTROPY
-export SECURE_AUTH_SALT=$PLATFORM_PROJECT_ENTROPY
-export LOGGED_IN_SALT=$PLATFORM_PROJECT_ENTROPY
-export NONCE_SALT=$PLATFORM_PROJECT_ENTROPY
diff --git a/templates/wordpress-bedrock/files/.lando.upstream.yaml b/templates/wordpress-bedrock/files/.lando.upstream.yaml
deleted file mode 100644
index 2f5fc6615..000000000
--- a/templates/wordpress-bedrock/files/.lando.upstream.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file sets some good defaults for local development using this Platform.sh
-# template with Lando.
-#
-# Note that you should not edit this file so it can continue to receive upstream
-# updates. If you wish to change the values below then override them in your
-# normal .lando.yml.
-
-# These both allow you to test this template without needing a site on Platform.sh
-# However you will want to replace them in your .lando.yml
-name: platformsh-bedrock
-recipe: platformsh
-
-# These are tools that are commonly used during development for this template.
-tooling:
- wp:
- service: app
-
\ No newline at end of file
diff --git a/templates/wordpress-bedrock/files/.platform.app.yaml b/templates/wordpress-bedrock/files/.platform.app.yaml
index c057d607e..9c33060c5 100644
--- a/templates/wordpress-bedrock/files/.platform.app.yaml
+++ b/templates/wordpress-bedrock/files/.platform.app.yaml
@@ -1,29 +1,36 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
# The runtime the application uses.
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: "php:8.1"
-# Configuration of the build of the application.
-build:
- flavor: composer
-
-dependencies:
- php:
- composer/composer: '^2'
- wp-cli/wp-cli-bundle: "^2.4.0"
-
# 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"
-# The configuration of app when it is exposed to the web.
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 2048
+
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
+mounts:
+ "web/app/wp-content/cache":
+ source: local
+ source_path: "cache"
+ "web/app/uploads":
+ source: local
+ source_path: "uploads"
+
+# 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:
locations:
"/":
@@ -59,18 +66,47 @@ web:
allow: true
expires: 1w
-# The size of the persistent disk of the application (in MB).
-disk: 2048
+# 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
+build:
+ flavor: composer
-# The mounts that will be performed when the package is deployed.
-mounts:
- "web/app/wp-content/cache":
- source: local
- source_path: "cache"
- "web/app/uploads":
- source: local
- source_path: "uploads"
+# 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'
+ wp-cli/wp-cli-bundle: "^2.4.0"
+
+# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
+# More info:
+hooks:
+ # The build hook is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -e
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: |
+ # Flushes the object cache which might have changed between current production and newly deployed changes
+ wp cache flush
+ # Runs the WordPress database update procedure in case core is being updated with the newly deployed changes
+ wp core update-db
+ # Runs all cron events that are due now and may have come due during the build+deploy procedure
+ wp cron event run --due-now
+########################################################################################################################
+## ##
+## This source operation is part of the Platform.sh process of updating and maintaining our collection of templates. ##
+## For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+## https://github.com/platformsh/source-operations ##
+## ##
+## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+## ##
+########################################################################################################################
source:
operations:
auto-update:
diff --git a/templates/wordpress-bedrock/files/README.md b/templates/wordpress-bedrock/files/README.md
deleted file mode 100644
index 627684ba0..000000000
--- a/templates/wordpress-bedrock/files/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# WordPress (Bedrock) for Platform.sh
-
-
-
-This template builds WordPress on Platform.sh using the Bedrock boilerplate by Roots with Composer. Plugins and themes should be managed with Composer exclusively. The only modifications made to the standard Bedrock boilerplate have been providing database credentials and main site url parameters via environment variables. With this configuration, the database is automatically configured such that the installer will not ask you for database credentials. While Bedrock provides support to replicate this configuration in a `.env` file for local development, an example Lando configuration file is included as the recommendated method to do so.
-
-WordPress is a blogging and lightweight CMS written in PHP, and Bedrock is a Composer-based WordPress boilerplate project with a slightly modified project structure and configuration protocol.
-
-## Features
-
-* PHP 8.1
-* MariaDB 10.4
-* Automatic TLS certificates
-* Composer-based build
-
-## Post-install
-
-Run through the WordPress installer as normal. You will not be asked for database credentials as those are already provided.
-
-## Customizations
-
-The following changes have been made relative to Bedrock's project creation command `composer create-project roots/bedrock`. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* A `.environment` file has been included which sets Bedrock's configuration on Platform.sh. It defines the connection to the MariaDB database, the primary site URL, and security keys and salts.
-* A base [Landofile](https://docs.lando.dev/config/lando.html#base-file) provides configuration to use this template locally using [Lando](https://docs.lando.dev).
-* In order to preserve 1-to-1 clones of development environments, `WP_ENV` has been set to `production` in [`.environment`](./.environment). If you would instead prefer to have `WP_ENV` match the type of Platform.sh environment (i.e. development, staging), you can set change that line to `export WP_ENV="${PLATFORM_ENVIRONMENT_TYPE}"`.
-
-## Local development
-
-This template has been configured for use with [Lando](https://docs.lando.dev). Lando is Platform.sh's recommended local development tool. It is capable of reading your Platform.sh configuration files and standing up an environment that is _very similar_ to your Platform.sh project. Additionally, Lando can easily pull down databases and file mounts from your Platform.sh project.
-
-To get started using Lando with your Platform.sh project check out the [Quick Start](https://docs.platform.sh/development/local/lando.html) or the [official Lando Platform.sh documentation](https://docs.lando.dev/config/platformsh.html).
-
-## References
-
-* [Bedrock at Roots](https://roots.io/bedrock/)
-* [Bedrock documentation](https://roots.io/docs/bedrock/master/installation/)
-* [Bedrock on GitHub](https://github.com/roots/bedrock)
-* [WordPress](https://wordpress.org/)
-* [WordPress on Platform.sh](https://docs.platform.sh/frameworks/wordpress.html)
-* [PHP on Platform.sh](https://docs.platform.sh/languages/php.html)
-* [How to install Wordpress plugins and themes with Composer](https://community.platform.sh/t/how-to-install-wordpress-plugins-and-themes-with-composer/507)
-* [How to install custom/private Wordpress plugins and themes with Composer](https://community.platform.sh/t/how-to-install-custom-private-wordpress-plugins-and-themes-with-composer/622)
diff --git a/templates/wordpress-composer/files/.platform.app.yaml b/templates/wordpress-composer/files/.platform.app.yaml
index 9ef453cf5..0695f8262 100644
--- a/templates/wordpress-composer/files/.platform.app.yaml
+++ b/templates/wordpress-composer/files/.platform.app.yaml
@@ -8,41 +8,6 @@ name: app
# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
type: 'php:8.1'
-# 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
-build:
- flavor: composer
-
-# 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'
- wp-cli/wp-cli-bundle: "^2.4.0"
-
-# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
-# More info:
-hooks:
- # The build hook is run after any build flavor.
- # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
- build: |
- set -e
- # Copy manually-provided plugins into the plugins directory.
- # This allows manually-provided and composer-provided plugins to coexist.
- rsync -a plugins/* wordpress/wp-content/plugins/
-
- # The deploy hook is run after the app container has been started, but before it has started accepting requests.
- # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
- deploy: |
- # Flushes the object cache which might have changed between current production and newly deployed changes
- wp cache flush
- # Runs the WordPress database update procedure in case core is being updated with the newly deployed changes
- wp core update-db
- # Runs all cron events that are due now and may have come due during the build+deploy procedure
- wp cron event run --due-now
-
# 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
@@ -51,6 +16,19 @@ hooks:
relationships:
database: "db:mysql"
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 2048
+
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
+mounts:
+ "wordpress/wp-content/cache":
+ source: local
+ source_path: "cache"
+ "wordpress/wp-content/uploads":
+ source: local
+ source_path: "uploads"
+
# 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:
@@ -94,18 +72,41 @@ web:
allow: true
expires: 1w
-# The size of the persistent disk of the application (in MB). Minimum value is 128.
-disk: 2048
-# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
-# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
-mounts:
- "wordpress/wp-content/cache":
- source: local
- source_path: "cache"
- "wordpress/wp-content/uploads":
- source: local
- source_path: "uploads"
+# 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
+build:
+ flavor: composer
+
+# 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'
+ wp-cli/wp-cli-bundle: "^2.4.0"
+
+# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
+# More information:
+hooks:
+ # The build hook is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -e
+ # Copy manually-provided plugins into the plugins directory.
+ # This allows manually-provided and composer-provided plugins to coexist.
+ rsync -a plugins/* wordpress/wp-content/plugins/
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: |
+ # Flushes the object cache which might have changed between current production and newly deployed changes
+ wp cache flush
+ # Runs the WordPress database update procedure in case core is being updated with the newly deployed changes
+ wp core update-db
+ # Runs all cron events that are due now and may have come due during the build+deploy procedure
+ wp cron event run --due-now
########################################################################################################################
## ##
diff --git a/templates/wordpress-vanilla/files/.environment b/templates/wordpress-vanilla/files/.environment
deleted file mode 100644
index ba02b7bb5..000000000
--- a/templates/wordpress-vanilla/files/.environment
+++ /dev/null
@@ -1,14 +0,0 @@
-export DB_NAME=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].path")
-export DB_HOST=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].host")
-export DB_PORT=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].port")
-export DB_USER=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].username")
-export DB_PASSWORD=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].password")
-
-export WP_HOME=$(echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.primary == true) | .key')
-export WP_SITEURL="${WP_HOME}wp"
-export WP_DEBUG_LOG=/var/log/app.log
-if [ "$PLATFORM_BRANCH" != "master" ] ; then
- export WP_ENV='development'
-else
- export WP_ENV='production'
-fi
diff --git a/templates/wordpress-vanilla/files/.gitignore b/templates/wordpress-vanilla/files/.gitignore
deleted file mode 100644
index 61cc1c349..000000000
--- a/templates/wordpress-vanilla/files/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Ignore mounts
-wordpress/wp-content/cache
-wordpress/wp-content/uploads
diff --git a/templates/wordpress-vanilla/files/.lando.upstream.yml b/templates/wordpress-vanilla/files/.lando.upstream.yml
deleted file mode 100644
index 79d882e52..000000000
--- a/templates/wordpress-vanilla/files/.lando.upstream.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file sets some good defaults for local development using this Platform.sh
-# template with Lando.
-#
-# Note that you should not edit this file so it can continue to receive upstream
-# updates. If you wish to change the values below then override them in your
-# normal .lando.yml.
-
-# These both allow you to test this template without needing a site on Platform.sh
-# However you will want to replace them in your .lando.yml
-name: platformsh-wordpress-vanilla
-recipe: platformsh
-
-# These are tools that are commonly used during development for this template.
-tooling:
- wp:
- service: app
diff --git a/templates/wordpress-vanilla/files/.platform.app.yaml b/templates/wordpress-vanilla/files/.platform.app.yaml
index 68bece227..140df2cac 100644
--- a/templates/wordpress-vanilla/files/.platform.app.yaml
+++ b/templates/wordpress-vanilla/files/.platform.app.yaml
@@ -1,26 +1,39 @@
-# This file describes an application. You can have multiple applications
-# in the same project.
+# Complete list of all available properties: https://docs.platform.sh/create-apps/app-reference.html
-# The name of this app. Must be unique within a project.
+# A unique name for the app. Must be lowercase alphanumeric characters. Changing the name destroys data associated
+# with the app.
name: app
# The runtime the application uses.
-type: "php:8.1"
-
-dependencies:
- php:
- wp-cli/wp-cli-bundle: "^2.4"
- psy/psysh: "^0.10.4"
+# Complete list of available runtimes: https://docs.platform.sh/create-apps/app-reference.html#types
+type: 'php:8.1'
# 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"
-# The configuration of app when it is exposed to the web.
+# The size of the persistent disk of the application (in MB). Minimum value is 128.
+disk: 2048
+
+# Mounts define directories that are writable after the build is complete. If set as a local source, disk property is required.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#mounts
+mounts:
+ "wordpress/wp-content/cache":
+ source: local
+ source_path: "cache"
+ "wordpress/wp-content/uploads":
+ source: local
+ source_path: "uploads"
+
+# 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:
+ # 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:
"/":
# The public directory of the app, relative to its root.
@@ -34,6 +47,10 @@ web:
expires: 600
scripts: true
allow: true
+ # The key of each item in rules is a regular expression to match paths exactly. If an incoming request
+ # matches the rule, it’s handled by the properties under the rule, overriding any conflicting rules from the
+ # rest of the locations properties.
+ # More information: https://docs.platform.sh/create-apps/app-reference.html#rules
rules:
^/composer\.json:
allow: false
@@ -55,15 +72,70 @@ web:
allow: true
expires: 1w
-# The size of the persistent disk of the application (in MB).
-disk: 2048
+# Platform.sh provides a number of ways to set variables. Variables set in your app configuration have the lowest
+# precedence, meaning they’re overridden by any conflicting values provided elsewhere.
+# More information: https://docs.platform.sh/create-apps/app-reference.html#variables
+variables:
+ # PHP specific variables: https://docs.platform.sh/development/variables.html#php-specific-variables
+ php:
+ session.gc_maxlifetime: '200000'
+ session.cookie_lifetime: '2000000'
+ pcre.backtrack_limit: '200000'
+ pcre.recursion_limit: '200000'
-# The mounts that will be performed when the package is deployed.
-mounts:
- "wordpress/wp-content/cache":
- source: local
- source_path: "cache"
- "wordpress/wp-content/uploads":
- source: local
- source_path: "uploads"
+# 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:
+ wp-cli/wp-cli-bundle: "^2.4"
+ psy/psysh: "^0.10.4"
+
+# Hooks allow you to customize your code/environment as the project moves through the build and deploy stages
+# More info:
+hooks:
+ # The build hook is run after any build flavor.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#build-hook
+ build: |
+ set -e
+
+ # The deploy hook is run after the app container has been started, but before it has started accepting requests.
+ # More information: https://docs.platform.sh/create-apps/hooks/hooks-comparison.html#deploy-hook
+ deploy: |
+ # Flushes the object cache which might have changed between current production and newly deployed changes
+ wp cache flush
+ # Runs the WordPress database update procedure in case core is being updated with the newly deployed changes
+ wp core update-db
+ # Runs all cron events that are due now and may have come due during the build+deploy procedure
+ wp cron event run --due-now
+########################################################################################################################
+## ##
+## This source operation is part of the Platform.sh process of updating and maintaining our collection of templates. ##
+## For more information see https://docs.platform.sh/create-apps/source-operations.html and ##
+## https://github.com/platformsh/source-operations ##
+## ##
+## YOU CAN SAFELY DELETE THIS COMMENT AND THE LINES BENEATH IT ##
+## ##
+########################################################################################################################
+source:
+ operations:
+ auto-update:
+ command: |
+ # get our pub directory as defined in the application
+ pubDir=$(echo $PLATFORM_APPLICATION | base64 --decode | jq -r '.web.locations."/".root')
+ # grab the latest version of WordPress, save locally based on pubDir name
+ curl https://wordpress.org/latest -o "${PLATFORM_CACHE_DIR}/${pubDir}.tar.gz"
+ cd "${PLATFORM_CACHE_DIR}"
+ tar -xvf "${pubDir}.tar.gz" && rm "${pubDir}.tar.gz"
+ # the archive always expands into a "wordpress" directory
+ rsync -av wordpress/ "${PLATFORM_SOURCE_DIR}/${pubDir}"
+ cd "${PLATFORM_SOURCE_DIR}"
+ git add --all
+ confirm=$(git status --porcelain=1);
+ if [ -z "${confirm}" ]; then
+ echo "No changes to commit."
+ else
+ git commit -m "Auto updated via source operations"
+ fi
diff --git a/templates/wordpress-vanilla/files/README.md b/templates/wordpress-vanilla/files/README.md
deleted file mode 100644
index 6d22ac64b..000000000
--- a/templates/wordpress-vanilla/files/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# WordPress (Vanilla) for Platform.sh
-
-
-
-This template builds WordPress on Platform.sh, installing WordPress to a subdirectory instead of to the project root. It does not use a package management tool like Composer, and updating core, themes, and plugins should be done with care. A custom configuration file is provided that runs on Platform.sh to automatically configure the database, so the installer will not ask you for database credentials.
-
-WordPress is a blogging and lightweight CMS written in PHP.
-
-## Features
-
-* PHP 8.1
-* MariaDB 10.4
-* Automatic TLS certificates
-
-## Post-install
-
-Run through the WordPress installer as normal. You will not be asked for database credentials as those are already provided.
-
-## Customizations
-
-The following changes have been made relative to Bedrock's project creation command `composer create-project roots/bedrock`. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* A `.environment` file has been included which sets WordPress's configuration on Platform.sh. It defines the connection to the MariaDB database, the primary site URL, and security keys and salts.
-* A base [Landofile](https://docs.lando.dev/config/lando.html#base-file) provides configuration to use this template locally using [Lando](https://docs.lando.dev).
-
-
-## Local development
-
-This template has been configured for use with [Lando](https://docs.lando.dev). Lando is Platform.sh's recommended local development tool. It is capable of reading your Platform.sh configuration files and standing up an environment that is _very similar_ to your Platform.sh project. Additionally, Lando can easily pull down databases and file mounts from your Platform.sh project.
-
-To get started using Lando with your Platform.sh project check out the [Quick Start](https://docs.platform.sh/development/local/lando.html) or the [official Lando Platform.sh documentation](https://docs.lando.dev/config/platformsh.html).
-
-## References
-
-* [WordPress](https://wordpress.org/)
-* [WordPress on Platform.sh](https://docs.platform.sh/frameworks/wordpress.html)
-* [PHP on Platform.sh](https://docs.platform.sh/languages/php.html)
-* [How to install Wordpress plugins and themes with Composer](https://community.platform.sh/t/how-to-install-wordpress-plugins-and-themes-with-composer/507)
-* [How to install custom/private Wordpress plugins and themes with Composer](https://community.platform.sh/t/how-to-install-custom-private-wordpress-plugins-and-themes-with-composer/622)
diff --git a/templates/wordpress-vanilla/files/wp-cli.yml b/templates/wordpress-vanilla/files/wp-cli.yml
deleted file mode 100644
index 01b74678b..000000000
--- a/templates/wordpress-vanilla/files/wp-cli.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-path: /app/wordpress/
-color: true
\ No newline at end of file
diff --git a/templates/wordpress-vanilla/files/wp-config.php b/templates/wordpress-vanilla/files/wp-config.php
deleted file mode 100644
index 61f318f69..000000000
--- a/templates/wordpress-vanilla/files/wp-config.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
-
-
-
-This template builds WordPress on Platform.sh using the Bedrock boilerplate by Roots with Composer. It includes WooCommerce and JetPack as dependencies, which when enabled will quickly allow you to create a store on WordPress.
-
-Plugins and themes should be managed with Composer exclusively. The only modifications made to the standard Bedrock boilerplate have been providing database credentials and main site url parameters via environment variables. With this configuration, the database is automatically configured such that the installer will not ask you for database credentials. While Bedrock provides support to replicate this configuration in a `.env` file for local development, an example Lando configuration file is included as the recommendated method to do so.
-
-WordPress is a blogging and lightweight CMS written in PHP, and Bedrock is a Composer-based WordPress boilerplate project with a slightly modified project structure and configuration protocol. WooCommerce is an open-source eCommerce platform and plugin for WordPress.
-
-## Features
-
-* PHP 8.1
-* MariaDB 10.4
-* Automatic TLS certificates
-* Composer-based build
-
-## Post-install
-
-Run through the WordPress installer as normal. You will not be asked for database credentials as those are already provided. Once you have finished the installation and have logged into the site, go to the Plugins section of the sidebar and 'Activate' WooCommerce. Follow the instructions to finish setting up your store.
-
-## Customizations
-
-The following changes have been made relative to Bedrock's project creation command `composer create-project roots/bedrock`. If using this project as a reference for your own existing project, replicate the changes below to your project.
-
-* The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
-* A `.environment` file has been included which sets Bedrock's configuration on Platform.sh. It defines the connection to the MariaDB database, the primary site URL, and security keys and salts.
-* A base [Landofile](https://docs.lando.dev/config/lando.html#base-file) provides configuration to use this template locally using [Lando](https://docs.lando.dev).
-* `woocommerce` and `jetpack` have been added as dependencies from the regular [`wordpress-bedrock`](https://github.com/platformsh-templates/wordpress-bedrock) template to support running a store with WordPress.
-
-## Local development
-
-This template has been configured for use with [Lando](https://docs.lando.dev). Lando is Platform.sh's recommended local development tool. It is capable of reading your Platform.sh configuration files and standing up an environment that is _very similar_ to your Platform.sh project. Additionally, Lando can easily pull down databases and file mounts from your Platform.sh project.
-
-To get started using Lando with your Platform.sh project check out the [Quick Start](https://docs.platform.sh/development/local/lando.html) or the [official Lando Platform.sh documentation](https://docs.lando.dev/config/platformsh.html).
-
-## References
-
-* [Bedrock at Roots](https://roots.io/bedrock/)
-* [Bedrock documentation](https://roots.io/docs/bedrock/master/installation/)
-* [Bedrock on GitHub](https://github.com/roots/bedrock)
-* [WooCommerce](https://woocommerce.com/)
-* [WordPress](https://wordpress.org/)
-* [WordPress on Platform.sh](https://docs.platform.sh/frameworks/wordpress.html)
-* [PHP on Platform.sh](https://docs.platform.sh/languages/php.html)
-* [How to install Wordpress plugins and themes with Composer](https://community.platform.sh/t/how-to-install-wordpress-plugins-and-themes-with-composer/507)
-* [How to install custom/private Wordpress plugins and themes with Composer](https://community.platform.sh/t/how-to-install-custom-private-wordpress-plugins-and-themes-with-composer/622)