From 062de5a2c7dcdaf7e93a800aff212551fa2aaa71 Mon Sep 17 00:00:00 2001 From: fumimowdan Date: Mon, 23 Oct 2023 15:01:42 +0100 Subject: [PATCH] Update dockerfile Run yarn install --- Dockerfile | 2 ++ lib/tasks/assets_vendor.rake | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 lib/tasks/assets_vendor.rake diff --git a/Dockerfile b/Dockerfile index 6459bf48..8ca0426c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,8 @@ RUN apk add --update --no-cache --virtual build-dependances \ apk del build-dependances COPY package.json yarn.lock ./ +RUN yarn install --frozen-lockfile && \ + yarn cache clean COPY . . diff --git a/lib/tasks/assets_vendor.rake b/lib/tasks/assets_vendor.rake deleted file mode 100644 index 2d564197..00000000 --- a/lib/tasks/assets_vendor.rake +++ /dev/null @@ -1,14 +0,0 @@ -namespace :assets do - desc "Copy govuk-frontend assets to vendor assets folder" - task vendor: :environment do - node_govuk_assets_path = Rails.root.join("node_modules/govuk-frontend/govuk/assets") - govuk_assets_path = Rails.root.join("vendor/assets") - - system("yarn --frozen-lockfile") - system("yarn cache clean") - system("mkdir -p #{govuk_assets_path}/assets") - system("cp -r #{node_govuk_assets_path} #{govuk_assets_path}") - end -end - -Rake::Task["dartsass:build"].enhance(["assets:vendor"])