From 5d5d1a6fd68bf23972e2ff6f0908977a61f135d7 Mon Sep 17 00:00:00 2001 From: Peter David Hamilton Date: Fri, 25 Aug 2023 10:41:35 +0100 Subject: [PATCH] Avoid increasing disk quota by tidying up after new DfE project code dfe-frontend-alpha > backstopjs > playwright --- Dockerfile | 10 +++++++++- terraform/app/modules/paas/inputs.tf | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf54f01a3e..b68763b4d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,10 +83,18 @@ COPY .yarnrc.yml ${APP_HOME}/.yarnrc.yml COPY --from=deps /build/.yarn ${APP_HOME}/.yarn COPY --from=deps /build/node_modules ${APP_HOME}/node_modules +# TODO: remove cache deletion +# +# npm package dfe-frontend-alpha includes a dev dependency called ms-playwright. +# This uses an extra ~1GB of disk space. +# Once package maintainers move this out of the runtime group it will no longer be an issue. +# Image building will stall here once the directory no longer exists. +# RUN SECRET_KEY_BASE=x \ GOVUK_APP_DOMAIN=x \ GOVUK_WEBSITE_ROOT=x \ - bundle exec rails assets:precompile + bundle exec rails assets:precompile; \ + rm -r /root/.cache/ms-playwright COPY ./docker-entrypoint.sh / diff --git a/terraform/app/modules/paas/inputs.tf b/terraform/app/modules/paas/inputs.tf index 3f27773f97..e4ae773533 100644 --- a/terraform/app/modules/paas/inputs.tf +++ b/terraform/app/modules/paas/inputs.tf @@ -54,7 +54,7 @@ variable "web_app_memory" { variable "web_app_disk_quota" { type = number description = "Application disk quota" - default = 4096 + default = 2048 } variable "web_app_start_command" {