diff --git a/backend/.dockerignore b/.dockerignore similarity index 100% rename from backend/.dockerignore rename to .dockerignore diff --git a/Dockerfile b/Dockerfile index 5d2b526c..1e94bd80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,9 @@ RUN apk add --no-cache \ freetype \ harfbuzz \ ca-certificates \ - ttf-freefont + ttf-freefont \ + wget \ + unzip # Download Korean font for Puppeteer RUN mkdir /usr/share/fonts/nanumfont && \ @@ -34,6 +36,7 @@ ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser FROM base AS build COPY . /usr/src/app WORKDIR /usr/src/app +RUN sed -i 's/"prepare": "husky install"/"prepare": ""/' ./package.json RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN pnpm backend db:generate RUN pnpm backend build diff --git a/backend/package.json b/backend/package.json index 8d94e665..57ba9b3e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -2,7 +2,6 @@ "name": "@codepair/backend", "version": "0.1.14", "description": "CodePair Backend", - "type": "module", "author": "yorkie-team", "license": "Apache-2.0", "scripts": { @@ -34,6 +33,7 @@ "@langchain/core": "^0.1.18", "@langchain/ollama": "^0.0.4", "@langchain/openai": "^0.3.2", + "@nestjs/cli": "^10.4.5", "@nestjs/common": "^10.0.0", "@nestjs/config": "^3.1.1", "@nestjs/core": "^10.0.0", @@ -44,6 +44,7 @@ "@prisma/client": "^5.8.1", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", + "express": "^4.21.1", "html-pdf-node": "^1.0.8", "langchain": "^0.1.9", "markdown-it": "^14.1.0", @@ -55,7 +56,6 @@ "rxjs": "^7.8.1" }, "devDependencies": { - "@nestjs/cli": "^10.0.0", "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/express": "^4.17.17", diff --git a/package.json b/package.json index 54773ee9..cfd12bb9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "author": "yorkie-team", "license": "Apache-2.0", "scripts": { - "prepare": "husky .husky", + "prepare": "husky install", "preinstall": "npx only-allow pnpm", "frontend": "pnpm --filter=frontend", "backend": "pnpm --filter=backend", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 294ab435..69ba5e8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,6 +53,9 @@ importers: '@langchain/openai': specifier: ^0.3.2 version: 0.3.2(@langchain/core@0.1.63(openai@4.63.0(zod@3.23.8))) + '@nestjs/cli': + specifier: ^10.4.5 + version: 10.4.5 '@nestjs/common': specifier: ^10.0.0 version: 10.4.4(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) @@ -83,6 +86,9 @@ importers: class-validator: specifier: ^0.14.1 version: 0.14.1 + express: + specifier: ^4.21.1 + version: 4.21.1 html-pdf-node: specifier: ^1.0.8 version: 1.0.8 @@ -111,9 +117,6 @@ importers: specifier: ^7.8.1 version: 7.8.1 devDependencies: - '@nestjs/cli': - specifier: ^10.0.0 - version: 10.4.5 '@nestjs/schematics': specifier: ^10.0.0 version: 10.1.4(chokidar@3.6.0)(typescript@5.3.3) @@ -3329,6 +3332,10 @@ packages: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} + cookie@0.7.1: + resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} + engines: {node: '>= 0.6'} + cookiejar@2.1.4: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} @@ -3744,6 +3751,10 @@ packages: resolution: {integrity: sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==} engines: {node: '>= 0.10.0'} + express@4.21.1: + resolution: {integrity: sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==} + engines: {node: '>= 0.10.0'} + extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -9792,6 +9803,8 @@ snapshots: cookie@0.6.0: {} + cookie@0.7.1: {} + cookiejar@2.1.4: {} copy-to-clipboard@3.3.3: @@ -10247,6 +10260,42 @@ snapshots: transitivePeerDependencies: - supports-color + express@4.21.1: + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.3 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookie: 0.7.1 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.3.1 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.3 + methods: 1.1.2 + on-finished: 2.4.1 + parseurl: 1.3.3 + path-to-regexp: 0.1.10 + proxy-addr: 2.0.7 + qs: 6.13.0 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.19.0 + serve-static: 1.16.2 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + extend@3.0.2: {} external-editor@3.1.0: