From 5612614e5ab4f8f1198d8df9e7f16d4fe69c6a89 Mon Sep 17 00:00:00 2001 From: Maciej Kobus Date: Thu, 20 Jul 2023 09:24:47 +0200 Subject: [PATCH] Created configuration files for 4.5 release --- resources/platformsh/common/4.5/.nvmrc | 1 + .../ibexa-commerce/4.5/.platform.app.yaml | 25 +++++++++---------- .../ibexa-content/4.5/.platform.app.yaml | 25 +++++++++---------- .../ibexa-experience/4.5/.platform.app.yaml | 25 +++++++++---------- .../ibexa-oss/4.5/.platform.app.yaml | 19 +++++++------- 5 files changed, 46 insertions(+), 49 deletions(-) create mode 100644 resources/platformsh/common/4.5/.nvmrc diff --git a/resources/platformsh/common/4.5/.nvmrc b/resources/platformsh/common/4.5/.nvmrc new file mode 100644 index 0000000..3beeadf --- /dev/null +++ b/resources/platformsh/common/4.5/.nvmrc @@ -0,0 +1 @@ +v14.18.3 \ No newline at end of file diff --git a/resources/platformsh/ibexa-commerce/4.5/.platform.app.yaml b/resources/platformsh/ibexa-commerce/4.5/.platform.app.yaml index 1930659..ea0664b 100644 --- a/resources/platformsh/ibexa-commerce/4.5/.platform.app.yaml +++ b/resources/platformsh/ibexa-commerce/4.5/.platform.app.yaml @@ -11,6 +11,7 @@ name: app dependencies: nodejs: yarn: "*" + n: "*" php: composer/composer: '^2.0' @@ -54,6 +55,8 @@ variables: realpath_cache_size: 4096K realpath_cache_ttl: 600 env: + # Location for N to store node versions + N_PREFIX: /app/.global # We disable Symfony Proxy (CacheKernel), as we rather use Varnish APP_HTTP_CACHE: 0 # Warning: Only for Varnish on Platform.sh to workaround missing IP. Disable if you use Fastly or Symfony Proxy where this would be a security issue! @@ -144,13 +147,12 @@ hooks: build: | set -e - # Install newer version of Node.js, as current default (v6LTS) does not play well with WebpackEncore - unset NPM_CONFIG_PREFIX - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | dash - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm current - nvm install 14.18.3 + # Install the version specified in the .nvmrc file + # but only if N command exists + hash n && n auto + + # Reset the location hash to recognize the newly installed version + hash -r if [ -z "$COMPOSER_AUTH" ]; then echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable" @@ -164,9 +166,6 @@ hooks: deploy: | set -e - unset NPM_CONFIG_PREFIX - command -v nvm && nvm use 14.18.3 - if [ ! -f public/var/.platform.installed ]; then # Configure ElasticSearch mappings ##php bin/console ibexa:elasticsearch:put-index-template @@ -207,9 +206,9 @@ hooks: # Depending on your VCL, buy default this would trigger a soft purge (expiry) and allow grace period, however # even so if your change only affected certain subset of content, ideally you should only clear specific tags: ##bin/console fos:httpcache:invalidate:tag l44 c33 ct2 ... - - # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. - # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing + + # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. + # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing # Example VCL snippet upload using vcl_recv hook (remember about FASTLY_SERVICE_ID and FASTLY_KEY environmental variables): ##fastly vcl custom create --name="Ibexa VCL" --main --version=latest --autoclone --content=vendor/ibexa/fastly/fastly/ez_main.vcl ##fastly vcl snippet create --name="Shielding" --version=active --autoclone --type recv --content=vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl diff --git a/resources/platformsh/ibexa-content/4.5/.platform.app.yaml b/resources/platformsh/ibexa-content/4.5/.platform.app.yaml index 7c21d53..7439b50 100644 --- a/resources/platformsh/ibexa-content/4.5/.platform.app.yaml +++ b/resources/platformsh/ibexa-content/4.5/.platform.app.yaml @@ -11,6 +11,7 @@ name: app dependencies: nodejs: yarn: "*" + n: "*" php: composer/composer: '^2.0' @@ -54,6 +55,8 @@ variables: realpath_cache_size: 4096K realpath_cache_ttl: 600 env: + # Location for N to store node versions + N_PREFIX: /app/.global # We disable Symfony Proxy (CacheKernel), as we rather use Varnish APP_HTTP_CACHE: 0 # Warning: Only for Varnish on Platform.sh to workaround missing IP. Disable if you use Fastly or Symfony Proxy where this would be a security issue! @@ -144,13 +147,12 @@ hooks: build: | set -e - # Install newer version of Node.js, as current default (v6LTS) does not play well with WebpackEncore - unset NPM_CONFIG_PREFIX - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | dash - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm current - nvm install 14.18.3 + # Install the version specified in the .nvmrc file + # but only if N command exists + hash n && n auto + + # Reset the location hash to recognize the newly installed version + hash -r if [ -z "$COMPOSER_AUTH" ]; then echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable" @@ -164,9 +166,6 @@ hooks: deploy: | set -e - unset NPM_CONFIG_PREFIX - command -v nvm && nvm use 14.18.3 - if [ ! -f public/var/.platform.installed ]; then # Configure ElasticSearch mappings ##php bin/console ibexa:elasticsearch:put-index-template @@ -207,9 +206,9 @@ hooks: # Depending on your VCL, buy default this would trigger a soft purge (expiry) and allow grace period, however # even so if your change only affected certain subset of content, ideally you should only clear specific tags: ##bin/console fos:httpcache:invalidate:tag l44 c33 ct2 ... - - # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. - # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing + + # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. + # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing # Example VCL snippet upload using vcl_recv hook (remember about FASTLY_SERVICE_ID and FASTLY_KEY environmental variables): ##fastly vcl custom create --name="Ibexa VCL" --main --version=latest --autoclone --content=vendor/ibexa/fastly/fastly/ez_main.vcl ##fastly vcl snippet create --name="Shielding" --version=active --autoclone --type recv --content=vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl diff --git a/resources/platformsh/ibexa-experience/4.5/.platform.app.yaml b/resources/platformsh/ibexa-experience/4.5/.platform.app.yaml index 7c21d53..7439b50 100644 --- a/resources/platformsh/ibexa-experience/4.5/.platform.app.yaml +++ b/resources/platformsh/ibexa-experience/4.5/.platform.app.yaml @@ -11,6 +11,7 @@ name: app dependencies: nodejs: yarn: "*" + n: "*" php: composer/composer: '^2.0' @@ -54,6 +55,8 @@ variables: realpath_cache_size: 4096K realpath_cache_ttl: 600 env: + # Location for N to store node versions + N_PREFIX: /app/.global # We disable Symfony Proxy (CacheKernel), as we rather use Varnish APP_HTTP_CACHE: 0 # Warning: Only for Varnish on Platform.sh to workaround missing IP. Disable if you use Fastly or Symfony Proxy where this would be a security issue! @@ -144,13 +147,12 @@ hooks: build: | set -e - # Install newer version of Node.js, as current default (v6LTS) does not play well with WebpackEncore - unset NPM_CONFIG_PREFIX - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | dash - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm current - nvm install 14.18.3 + # Install the version specified in the .nvmrc file + # but only if N command exists + hash n && n auto + + # Reset the location hash to recognize the newly installed version + hash -r if [ -z "$COMPOSER_AUTH" ]; then echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable" @@ -164,9 +166,6 @@ hooks: deploy: | set -e - unset NPM_CONFIG_PREFIX - command -v nvm && nvm use 14.18.3 - if [ ! -f public/var/.platform.installed ]; then # Configure ElasticSearch mappings ##php bin/console ibexa:elasticsearch:put-index-template @@ -207,9 +206,9 @@ hooks: # Depending on your VCL, buy default this would trigger a soft purge (expiry) and allow grace period, however # even so if your change only affected certain subset of content, ideally you should only clear specific tags: ##bin/console fos:httpcache:invalidate:tag l44 c33 ct2 ... - - # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. - # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing + + # It is possible to manipulate your Fastly VCL configuration directly from command line using Fastly CLI. + # Official documentation on how to install: https://developer.fastly.com/learning/tools/cli#installing # Example VCL snippet upload using vcl_recv hook (remember about FASTLY_SERVICE_ID and FASTLY_KEY environmental variables): ##fastly vcl custom create --name="Ibexa VCL" --main --version=latest --autoclone --content=vendor/ibexa/fastly/fastly/ez_main.vcl ##fastly vcl snippet create --name="Shielding" --version=active --autoclone --type recv --content=vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl diff --git a/resources/platformsh/ibexa-oss/4.5/.platform.app.yaml b/resources/platformsh/ibexa-oss/4.5/.platform.app.yaml index 40f5f73..954a313 100644 --- a/resources/platformsh/ibexa-oss/4.5/.platform.app.yaml +++ b/resources/platformsh/ibexa-oss/4.5/.platform.app.yaml @@ -11,6 +11,7 @@ name: app dependencies: nodejs: yarn: "*" + n: "*" php: composer/composer: '^2.0' @@ -54,6 +55,8 @@ variables: realpath_cache_size: 4096K realpath_cache_ttl: 600 env: + # Location for N to store node versions + N_PREFIX: /app/.global # We disable Symfony Proxy (CacheKernel), as we rather use Varnish APP_HTTP_CACHE: 0 # Warning: Only for Varnish on Platform.sh to workaround missing IP. Disable if you use Fastly or Symfony Proxy where this would be a security issue! @@ -141,13 +144,12 @@ hooks: build: | set -e - # Install newer version of Node.js, as current default (v6LTS) does not play well with WebpackEncore - unset NPM_CONFIG_PREFIX - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | dash - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - nvm current - nvm install 14.18.3 + # Install the version specified in the .nvmrc file + # but only if N command exists + hash n && n auto + + # Reset the location hash to recognize the newly installed version + hash -r if [ -z "$COMPOSER_AUTH" ]; then echo "TIP: If you need to authenticate against Github/Gitlab/updates.ibexa.co, use COMPOSER_AUTH env variable" @@ -161,9 +163,6 @@ hooks: deploy: | set -e - unset NPM_CONFIG_PREFIX - command -v nvm && nvm use 14.18.3 - if [ ! -f public/var/.platform.installed ]; then # To workaround issues with p.sh Varnish we clear container cache & temporary set Symfony Proxy export SKIP_HTTPCACHE_PURGE="1"