From c91ed73d649b3eea5f729902de916ca4987052ea Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 6 Sep 2023 23:07:15 -0400 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e1bf05c..99836a4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@

Linkwarden

Discord -Github Activity +GitHub commits since latest release (by SemVer including pre-releases) Top Language Github Stars From 3eb273c25ee612e962c0dc16017de59a7f868af0 Mon Sep 17 00:00:00 2001 From: Mathias Petermann Date: Tue, 19 Sep 2023 21:41:40 +0200 Subject: [PATCH 2/2] Use official nodejs base image, slim down image - Playwright 1.35 supports debian 11 (bullseye), for debian 12 (bookworm) support, playwright needs to be updated - Ensure all apt & yarn caches are cleaned in the same step they are used (slims down image) - Image uses a lot less steps now, and slimmed down form ~4GB to 2.5GB --- Dockerfile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a875e5..42a9ade 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,22 @@ # playwright doesnt support debian image -FROM ubuntu:focal +FROM node:20-bullseye-slim -RUN apt-get update && apt-get install wget xz-utils -y +ARG DEBIAN_FRONTEND=noninteractive RUN mkdir /data WORKDIR /data -RUN wget https://nodejs.org/dist/v20.5.0/node-v20.5.0-linux-x64.tar.xz -O nodejs.tar.xz \ - && mkdir /opt/nodejs \ - && tar -xf nodejs.tar.xz --strip-components 1 -C /opt/nodejs \ - && rm nodejs.tar.xz -ENV PATH="$PATH:/opt/nodejs/bin" -RUN npm install -g yarn - COPY ./package.json ./yarn.lock ./playwright.config.ts ./ -RUN yarn -RUN npx playwright install-deps +RUN yarn && \ + npx playwright install-deps && \ + apt-get clean && \ + yarn cache clean COPY . . -RUN yarn prisma generate -RUN yarn build +RUN yarn prisma generate && \ + yarn build CMD yarn prisma migrate deploy && yarn start