From d89ce908ea25eaa4daca8839f6d1d083a5dbe5d8 Mon Sep 17 00:00:00 2001 From: Christian Fritsch Date: Thu, 11 Jul 2024 11:41:36 +0200 Subject: [PATCH] Update ddev configuration (#76) * Update ddev configuration * Update * Add dump command --------- Co-authored-by: Christian Fritsch --- .../manifest.yaml | 4 +- .ddev/commands/web/dump-test-database | 11 ++++ .ddev/config.selenium-standalone-chrome.yaml | 4 +- .ddev/config.yaml | 55 ++++++++++++------- 4 files changed, 49 insertions(+), 25 deletions(-) create mode 100755 .ddev/commands/web/dump-test-database diff --git a/.ddev/addon-metadata/ddev-selenium-standalone-chrome/manifest.yaml b/.ddev/addon-metadata/ddev-selenium-standalone-chrome/manifest.yaml index bc3a132..6a71a7f 100644 --- a/.ddev/addon-metadata/ddev-selenium-standalone-chrome/manifest.yaml +++ b/.ddev/addon-metadata/ddev-selenium-standalone-chrome/manifest.yaml @@ -1,7 +1,7 @@ name: ddev-selenium-standalone-chrome repository: ddev/ddev-selenium-standalone-chrome -version: 1.0.4 -install_date: "2023-10-23T11:45:07+02:00" +version: 1.0.5 +install_date: "2024-07-10T20:32:17+02:00" project_files: - docker-compose.selenium-chrome.yaml - config.selenium-standalone-chrome.yaml diff --git a/.ddev/commands/web/dump-test-database b/.ddev/commands/web/dump-test-database new file mode 100755 index 0000000..17a552c --- /dev/null +++ b/.ddev/commands/web/dump-test-database @@ -0,0 +1,11 @@ +#!/bin/sh +#ddev-generated + +## Description: Dump the database as PHP file into the docroot. +## Usage: dump-test-database +## Example: ddev dump-test-database + +cd "${DDEV_COMPOSER_ROOT}"/"${DDEV_DOCROOT}" || exit + +# shellcheck disable=SC2154 +php core/scripts/db-tools.php dump-database-d8-mysql > "${thunderDumpFile}" diff --git a/.ddev/config.selenium-standalone-chrome.yaml b/.ddev/config.selenium-standalone-chrome.yaml index 280712d..61e40f9 100644 --- a/.ddev/config.selenium-standalone-chrome.yaml +++ b/.ddev/config.selenium-standalone-chrome.yaml @@ -12,7 +12,7 @@ web_environment: # Use disable-dev-shm-usage instead of setting shm_usage # https://developers.google.com/web/tools/puppeteer/troubleshooting#tips # The format of chromeOptions is defined at https://chromedriver.chromium.org/capabilities - - MINK_DRIVER_ARGS_WEBDRIVER=[\"chrome\", {\"browserName\":\"chrome\",\"chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"] + - MINK_DRIVER_ARGS_WEBDRIVER=[\"chrome\", {\"browserName\":\"chrome\",\"goog:chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"] # Nightwatch - DRUPAL_TEST_BASE_URL=http://web - DRUPAL_TEST_DB_URL=mysql://db:db@db/db @@ -26,4 +26,4 @@ web_environment: - DRUPAL_NIGHTWATCH_OUTPUT=reports/nightwatch # DTT - DTT_BASE_URL=http://web - - DTT_MINK_DRIVER_ARGS=[\"chrome\", {\"browserName\":\"chrome\",\"chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"] + - DTT_MINK_DRIVER_ARGS=[\"chrome\", {\"browserName\":\"chrome\",\"goog:chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"] diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 80e5e1f..bbd8334 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -1,22 +1,18 @@ name: thunder-develop -type: drupal10 +type: drupal docroot: docroot -php_version: "8.1" +php_version: "8.3" webserver_type: nginx-fpm xdebug_enabled: false additional_hostnames: [] additional_fqdns: [] database: type: mariadb - version: "10.4" + version: "10.11" use_dns_when_possible: true composer_version: "2" web_environment: - - DRUSH_OPTIONS_URI=https://thunder-develop.ddev.site/ - - SIMPLETEST_DB="mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}:3306/${MYSQL_DATABASE}" - - SIMPLETEST_BASE_URL="http://web" - - MINK_DRIVER_ARGS_WEBDRIVER=[\"chrome\", {\"browserName\":\"chrome\",\"chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--no-sandbox\", \"--disable-dev-shm-usage\", \"--window-size=1920,1080\"]}}, \"http://selenium-chrome:4444/wd/hub\"] - + - thunderDumpFile=${DDEV_COMPOSER_ROOT}/${DDEV_DOCROOT}/test-database-dump.php nodejs_version: "18" # Key features of DDEV's config.yaml: @@ -24,11 +20,14 @@ nodejs_version: "18" # name: # Name of the project, automatically provides # http://projectname.ddev.site and https://projectname.ddev.site -# type: # drupal6/7/8, backdrop, typo3, wordpress, php +# type: # backdrop, craftcms, django4, drupal, drupal6, drupal7, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress +# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more +# information on the different project types +# "drupal" covers recent Drupal 8+ # docroot: # Relative path to the directory containing index.php. -# php_version: "8.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" +# php_version: "8.2" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" # You can explicitly specify the webimage but this # is not recommended, as the images are often closely tied to DDEV's' behavior, @@ -38,9 +37,9 @@ nodejs_version: "18" # database: # type: # mysql, mariadb, postgres -# version: # database version, like "10.4" or "8.0" +# version: # database version, like "10.11" or "8.0" # MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0 -# PostgreSQL versions can be 9-15. +# PostgreSQL versions can be 9-16. # router_http_port: # Port to be used for http (defaults to global configuration, usually 80) # router_https_port: # Port for https (defaults to global configuration, usually 443) @@ -79,10 +78,17 @@ nodejs_version: "18" # Alternatively, an explicit Composer version may be specified, for example "2.2.18". # To reinstall Composer after the image was built, run "ddev debug refresh". -# nodejs_version: "18" -# change from the default system Node.js version to another supported version, like 14, 16, 18, 20. -# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any -# Node.js version, including v6, etc. +# nodejs_version: "20" +# change from the default system Node.js version to any other version. +# Numeric version numbers can be complete (i.e. 18.15.0) or +# incomplete (18, 17.2, 16). 'lts' and 'latest' can be used as well along with +# other named releases. +# see https://www.npmjs.com/package/n#specifying-nodejs-versions +# Note that you can continue using 'ddev nvm' or nvm inside the web container +# to change the project's installed node version if you need to. + +# corepack_enable: false +# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm # additional_hostnames: # - somename @@ -110,6 +116,13 @@ nodejs_version: "18" # If true, turns off the normal warning that says # "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set" +# ddev_version_constraint: "" +# Example: +# ddev_version_constraint: ">= 1.22.4" +# This will enforce that the running ddev version is within this constraint. +# See https://github.com/Masterminds/semver#checking-version-constraints for +# supported constraint formats + # working_dir: # web: /var/www/html # db: /home @@ -134,8 +147,8 @@ nodejs_version: "18" # - "mutagen": enables Mutagen for this project. # - "nfs": enables NFS for this project. # -# See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs -# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen +# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs +# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen # fail_on_hook_fail: False # Decide whether 'ddev start' should be interrupted by a failing hook @@ -188,7 +201,7 @@ nodejs_version: "18" # 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 +# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php # In this case the user must provide all such settings. # You can inject environment variables into the web container with: @@ -246,10 +259,10 @@ nodejs_version: "18" # override_config: false # By default, config.*.yaml files are *merged* into the configuration # But this means that some things can't be overridden -# For example, if you have 'nfs_mount_enabled: true'' you can't override it with a merge +# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge # and you can't erase existing hooks or all environment variables. # However, with "override_config: true" in a particular config.*.yaml file, -# 'nfs_mount_enabled: false' can override the existing values, and +# 'use_dns_when_possible: false' can override the existing values, and # hooks: # post-start: [] # or