From fd2b3d6b9af614938de52ce1dc513b18213e750e Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 14 Jan 2024 17:57:32 +0100 Subject: [PATCH] Updated docker files --- Dockerfile | 4 +++- Dockerfile.cache | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc82aac..9e0189e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,13 @@ FROM node-cache as cache FROM node:20.9.0-alpine3.18 -COPY --from=cache /node_modules /app/node_modules +COPY --from=cache /cache/node_modules /app/node_modules COPY . /app WORKDIR /app +ENV NODE_PATH=dist/ + RUN yarn global add typescript RUN yarn build diff --git a/Dockerfile.cache b/Dockerfile.cache index dd29ad9..02f8d66 100644 --- a/Dockerfile.cache +++ b/Dockerfile.cache @@ -1,6 +1,10 @@ FROM node:20.9.0-alpine3.18 -COPY package.json ./ -COPY yarn.lock ./ +RUN mkdir /cache + +COPY package.json /cache +COPY yarn.lock /cache + +WORKDIR /cache RUN yarn install \ No newline at end of file