From 1bf0ce0e4b8ce96d24a0fabd821eab1fe8394941 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sun, 5 May 2024 17:59:11 +1000 Subject: [PATCH] Update Node.js to 22.1.0 and use its cache feature --- .gitignore | 1 + Dockerfile | 3 ++- docker-compose.bot.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2a39089..9ae1fac 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,6 @@ .yarn .pnp.* dist +build_cache src/private src/*.json diff --git a/Dockerfile b/Dockerfile index 35e337e..cc1201e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ -FROM node:22.0.0-alpine3.19 +FROM node:22.1.0-alpine3.19 ENV YARN_VERSION 4.2.1 ENV TZ Australia/Sydney +ENV NODE_COMPILE_CACHE /Daggerbot/build_cache RUN yarn policies set-version $YARN_VERSION RUN apk update && apk upgrade && apk add --no-cache git fontconfig ttf-dejavu WORKDIR /Daggerbot diff --git a/docker-compose.bot.yml b/docker-compose.bot.yml index 6e6197c..f7db4b2 100644 --- a/docker-compose.bot.yml +++ b/docker-compose.bot.yml @@ -7,3 +7,4 @@ services: - ./.git:/Daggerbot/.git:rw - ./src/:/Daggerbot/src/:rw - ./dist/:/Daggerbot/dist/:rw + - ./build_cache/:/Daggerbot/build_cache:rw