diff --git a/templates/drupal9-govcms9/files/.platform.app.yaml b/templates/drupal9-govcms9/files/.platform.app.yaml index 4d5b1c648..761ae2e46 100644 --- a/templates/drupal9-govcms9/files/.platform.app.yaml +++ b/templates/drupal9-govcms9/files/.platform.app.yaml @@ -66,7 +66,7 @@ mounts: # Configuration of the build of this application. build: - flavor: composer + flavor: none # The hooks executed at various points in the lifecycle of the application. hooks: @@ -74,6 +74,9 @@ hooks: # No services are available but the disk is writeable. build: | set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + # 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 diff --git a/templates/drupal9-multisite/files/.platform.app.yaml b/templates/drupal9-multisite/files/.platform.app.yaml index 848777a53..122c2c0da 100644 --- a/templates/drupal9-multisite/files/.platform.app.yaml +++ b/templates/drupal9-multisite/files/.platform.app.yaml @@ -70,7 +70,7 @@ mounts: # Configuration of the build of this application. build: # Automatically run `composer install` on every build. - flavor: composer + flavor: none # The hooks executed at various points in the lifecycle of the application. hooks: @@ -78,6 +78,9 @@ hooks: # No services are available but the disk is writeable. build: | set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + # 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 diff --git a/templates/drupal9/files/.platform.app.yaml b/templates/drupal9/files/.platform.app.yaml index dfd2d030f..a7f4ec3a4 100644 --- a/templates/drupal9/files/.platform.app.yaml +++ b/templates/drupal9/files/.platform.app.yaml @@ -66,7 +66,7 @@ mounts: # Configuration of the build of this application. build: - flavor: composer + flavor: none # The hooks executed at various points in the lifecycle of the application. hooks: @@ -74,6 +74,9 @@ hooks: # No services are available but the disk is writeable. build: | set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + # 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 @@ -148,7 +151,7 @@ crons: # Run Drupal's cron tasks every 19 minutes. drupal: spec: '*/19 * * * *' - commands: + commands: start: 'cd web ; drush core-cron' source: diff --git a/templates/gatsby-drupal/files/drupal/.platform.app.yaml b/templates/gatsby-drupal/files/drupal/.platform.app.yaml index 98817ab1d..242c51078 100644 --- a/templates/gatsby-drupal/files/drupal/.platform.app.yaml +++ b/templates/gatsby-drupal/files/drupal/.platform.app.yaml @@ -49,7 +49,7 @@ mounts: # Configuration of the build of this application. build: - flavor: composer + flavor: none # The hooks executed at various points in the lifecycle of the application. hooks: @@ -57,6 +57,9 @@ hooks: build: | set -e bash install-redis.sh 4.3.0 + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + # The deploy hook runs after your application has been deployed and started. deploy: | set -e diff --git a/templates/gatsby-wordpress/files/wordpress/.platform.app.yaml b/templates/gatsby-wordpress/files/wordpress/.platform.app.yaml index 6db8113a2..18bcb6c8d 100644 --- a/templates/gatsby-wordpress/files/wordpress/.platform.app.yaml +++ b/templates/gatsby-wordpress/files/wordpress/.platform.app.yaml @@ -9,7 +9,7 @@ type: 'php:8.1' # Configuration of the build of the application. build: - flavor: composer + flavor: none dependencies: php: @@ -65,3 +65,11 @@ mounts: "wordpress/wp-content/uploads": source: local source_path: "uploads" + +hooks: + build: | + # Exit hook immediately if a command exits with a non-zero status. + set -e + + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader diff --git a/templates/magento2ce/files/.platform.app.yaml b/templates/magento2ce/files/.platform.app.yaml index a9dbbb5ce..c621d9212 100644 --- a/templates/magento2ce/files/.platform.app.yaml +++ b/templates/magento2ce/files/.platform.app.yaml @@ -19,7 +19,7 @@ runtime: # Configuration of the build of this application. build: - flavor: composer + flavor: none dependencies: php: @@ -58,6 +58,8 @@ mounts: hooks: build: | set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader php ./vendor/bin/ece-tools build:generate php ./vendor/bin/ece-tools build:transfer deploy: | diff --git a/templates/sylius/files/.platform.app.yaml b/templates/sylius/files/.platform.app.yaml index 2e83c4733..95c0613c3 100644 --- a/templates/sylius/files/.platform.app.yaml +++ b/templates/sylius/files/.platform.app.yaml @@ -1,7 +1,7 @@ name: app type: php:8.1 build: - flavor: composer + flavor: none variables: env: @@ -13,6 +13,8 @@ variables: hooks: build: | set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader # Install the node version specified in the .nvmrc file n auto # Reset the location hash to recognize the newly installed version diff --git a/templates/typo3/files/.platform.app.yaml b/templates/typo3/files/.platform.app.yaml index d806765c2..2a9ad0fd6 100644 --- a/templates/typo3/files/.platform.app.yaml +++ b/templates/typo3/files/.platform.app.yaml @@ -22,7 +22,7 @@ runtime: # composer --no-ansi --no-interaction install --no-progress --prefer-dist --optimize-autoloader # if composer.json is detected. build: - flavor: composer + flavor: none # 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 @@ -122,6 +122,8 @@ hooks: build: | # Exit hook immediately if a command exits with a non-zero status. set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader # Start the installation with no interaction or extension setup, using `SetupConfiguration.yaml`. if [ ! -f var/platformsh.installed ]; then diff --git a/templates/wordpress-bedrock/files/.platform.app.yaml b/templates/wordpress-bedrock/files/.platform.app.yaml index c057d607e..8a7ef7726 100644 --- a/templates/wordpress-bedrock/files/.platform.app.yaml +++ b/templates/wordpress-bedrock/files/.platform.app.yaml @@ -9,7 +9,7 @@ type: "php:8.1" # Configuration of the build of the application. build: - flavor: composer + flavor: none dependencies: php: @@ -71,6 +71,14 @@ mounts: source: local source_path: "uploads" +hooks: + build: | + # Exit hook immediately if a command exits with a non-zero status. + set -e + + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + source: operations: auto-update: diff --git a/templates/wordpress-composer/files/.platform.app.yaml b/templates/wordpress-composer/files/.platform.app.yaml index a77983ab4..628c607ed 100644 --- a/templates/wordpress-composer/files/.platform.app.yaml +++ b/templates/wordpress-composer/files/.platform.app.yaml @@ -9,7 +9,7 @@ type: 'php:8.1' # Configuration of the build of the application. build: - flavor: composer + flavor: none dependencies: php: @@ -19,6 +19,9 @@ dependencies: hooks: build: | set -e + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + # 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/ diff --git a/templates/wordpress-woocommerce/files/.platform.app.yaml b/templates/wordpress-woocommerce/files/.platform.app.yaml index 82a440bb6..a279d2bfa 100644 --- a/templates/wordpress-woocommerce/files/.platform.app.yaml +++ b/templates/wordpress-woocommerce/files/.platform.app.yaml @@ -14,7 +14,7 @@ dependencies: # Configuration of the build of the application. build: - flavor: composer + flavor: none # 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 @@ -74,6 +74,14 @@ mounts: source: local source_path: "uploads" +hooks: + build: | + # Exit hook immediately if a command exits with a non-zero status. + set -e + + # @see https://docs.platform.sh/languages/php.html#change-the-build-flavor adding `--no-dev` + composer install --no-dev --no-progress --no-ansi --no-interaction --prefer-dist --optimize-autoloader + source: operations: auto-update: