From f8a82b7d68f3d20a3304a2d2b788ed34911f96fe Mon Sep 17 00:00:00 2001 From: Larsundso Date: Fri, 6 Sep 2024 10:46:58 +0200 Subject: [PATCH] Dockerize --- Dockerfile | 18 ++++++++++++++++-- package.json | 1 - 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70c60589..ecda8e26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,23 @@ FROM node:22 WORKDIR /app RUN corepack enable +RUN apt-get update && apt-get install -y \ + build-essential \ + libcairo2-dev \ + libpango1.0-dev \ + libjpeg-dev \ + libgif-dev \ + librsvg2-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* +ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig COPY . . -WORKDIR /app/packages/Bot RUN pnpm install -RUN pnpx prisma generate + +WORKDIR /app/apps/Website +RUN pnpm link ../../packages/Server + +WORKDIR /app/packages/Bot +RUN pnpm link ../Server RUN pnpm build COPY ./packages/Bot/.env /app/packages/Bot/.env.template \ No newline at end of file diff --git a/package.json b/package.json index f1a8581c..ac76756a 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "lint": "npx eslint 'src/**/*.ts' --fix", "register": "node ./dist/register-commands.js", "run": "node --max-old-space-size=10240 --no-deprecation --no-warnings --experimental-json-modules ./dist/index.js", - "prestart": "rm -rf dist && pnpm build && pnpx prisma db push", "start": "pnpm run run", "watch": "swc src -d dist --strip-leading-paths --copy-files --watch" },