From 42346addc91134cf35793689504a62cf9eb36a4b Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Thu, 31 Oct 2024 14:44:23 -0400 Subject: [PATCH 1/3] BSD fixes #322: Lower the size of the storybook app so that deploys wont fail from lack of resources. --- .platform/applications.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.platform/applications.yaml b/.platform/applications.yaml index 1f6c5615..2b39888d 100644 --- a/.platform/applications.yaml +++ b/.platform/applications.yaml @@ -9,6 +9,9 @@ bixalcom: # The runtime the application uses. type: 'php:8.3' + # https://docs.platform.sh/create-apps/app-reference/single-runtime-image.html#sizes + size: AUTO + dependencies: php: composer/composer: '^2' @@ -215,6 +218,11 @@ bixalcom: storybook: type: nodejs:18 + # https://docs.platform.sh/create-apps/app-reference/single-runtime-image.html#sizes + # Running out of resources in prod because this added a HIGH_CPU profile. + # Lower the size. + size: S + web: locations: '/': From 1ae8f99bc01357798233fcf916d81e1816549bbc Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Thu, 31 Oct 2024 15:07:26 -0400 Subject: [PATCH 2/3] BSD fixes #322: Remove SB app so prod can load. --- .platform/applications.yaml | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/.platform/applications.yaml b/.platform/applications.yaml index 2b39888d..aafd1ece 100644 --- a/.platform/applications.yaml +++ b/.platform/applications.yaml @@ -215,47 +215,47 @@ bixalcom: commands: start: '[ "$PLATFORM_BRANCH" = main ] && bash cron/upload_logs_to_s3.sh' -storybook: - type: nodejs:18 - - # https://docs.platform.sh/create-apps/app-reference/single-runtime-image.html#sizes - # Running out of resources in prod because this added a HIGH_CPU profile. - # Lower the size. - size: S - - web: - locations: - '/': - # The folder from which to serve static assets, for this location. - # - # This is a filesystem path, relative to the application root. - root: 'storybook-static' - - # How long to allow static assets from this location to be cached. - # - # Can be a time in seconds, or -1 for no caching. Times can be - # suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d" - # (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as - # 365 days). - expires: 5m - - # Allow storybook's landing .html file to be picked up when going to /. - index: - - 'index.html' - - # Disable server side scripts. - scripts: false - - # Allow access to all static files. - allow: true - - commands: - # Run a no-op process that uses no CPU resources since this is a static site - start: sleep infinity - - hooks: - build: | - # Building for a sub-dir caused a 502 on platform that I could not - # figure out. - # BASE_PATH=/sb npm run build-storybook - npm run build-storybook \ No newline at end of file +#storybook: +# type: nodejs:18 +# +# # https://docs.platform.sh/create-apps/app-reference/single-runtime-image.html#sizes +# # Running out of resources in prod because this added a HIGH_CPU profile. +# # Lower the size. +# size: S +# +# web: +# locations: +# '/': +# # The folder from which to serve static assets, for this location. +# # +# # This is a filesystem path, relative to the application root. +# root: 'storybook-static' +# +# # How long to allow static assets from this location to be cached. +# # +# # Can be a time in seconds, or -1 for no caching. Times can be +# # suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d" +# # (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as +# # 365 days). +# expires: 5m +# +# # Allow storybook's landing .html file to be picked up when going to /. +# index: +# - 'index.html' +# +# # Disable server side scripts. +# scripts: false +# +# # Allow access to all static files. +# allow: true +# +# commands: +# # Run a no-op process that uses no CPU resources since this is a static site +# start: sleep infinity +# +# hooks: +# build: | +# # Building for a sub-dir caused a 502 on platform that I could not +# # figure out. +# # BASE_PATH=/sb npm run build-storybook +# npm run build-storybook \ No newline at end of file From f6c09103f4d697c18a47f329c43bca73dd23493b Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Thu, 31 Oct 2024 15:10:33 -0400 Subject: [PATCH 3/3] BSD fixes #322: Remove routes for storybook app too. --- .platform/routes.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.platform/routes.yaml b/.platform/routes.yaml index 257ca871..ace6aea3 100644 --- a/.platform/routes.yaml +++ b/.platform/routes.yaml @@ -19,15 +19,15 @@ # Base the cache on the session cookie and custom Drupal cookies. Ignore all other cookies. cookies: ['/^SS?ESS/', '/^Drupal.visitor/'] -"https://sb.{default}": - type: upstream - upstream: "storybook:http" - tls: - # https://docs.platform.sh/define-routes/https.html#stricttransportsecurity - strict_transport_security: - # This is one year, can't change. - enabled: true - include_subdomains: false - preload: false - cache: - enabled: true +#"https://sb.{default}": +# type: upstream +# upstream: "storybook:http" +# tls: +# # https://docs.platform.sh/define-routes/https.html#stricttransportsecurity +# strict_transport_security: +# # This is one year, can't change. +# enabled: true +# include_subdomains: false +# preload: false +# cache: +# enabled: true