From 1ec945a8ffa0b58c23535d681f4874b91281202f Mon Sep 17 00:00:00 2001 From: vgorkavenko Date: Sat, 31 Aug 2024 20:05:48 +0200 Subject: [PATCH] fix: building --- .swcrc | 5 ++++- Dockerfile.daemon | 3 ++- package.json | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.swcrc b/.swcrc index fff5a4c..3711a66 100644 --- a/.swcrc +++ b/.swcrc @@ -11,7 +11,10 @@ "legacyDecorator": true, "decoratorMetadata": true }, - "baseUrl": "./" + "baseUrl": "./src", + "paths": { + "build-info": ["../build-info.json"] + } }, "minify": false } diff --git a/Dockerfile.daemon b/Dockerfile.daemon index 084434e..939f50c 100644 --- a/Dockerfile.daemon +++ b/Dockerfile.daemon @@ -3,7 +3,7 @@ FROM node:20.12.1-alpine as building WORKDIR /app COPY package.json yarn.lock build-info.json ./ -COPY ./tsconfig*.json ./ +COPY ./tsconfig*.json ./nest-cli.json ./.swcrc ./ COPY ./src ./src RUN yarn install --frozen-lockfile --non-interactive && yarn cache clean && yarn typechain @@ -16,6 +16,7 @@ WORKDIR /app COPY --from=building /app/dist ./dist COPY --from=building /app/node_modules ./node_modules COPY ./package.json ./ +COPY ./build-info.json ./ RUN mkdir -p ./storage/ && chown -R node:node ./storage/ USER node diff --git a/package.json b/package.json index cdb35d1..2056963 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "private": true, "license": "GPL-3.0", "scripts": { - "prove": "NODE_OPTIONS=--max_old_space_size=8192 WORKING_MODE=cli node dist/src/main prove", - "prove:debug": "NODE_OPTIONS=--max_old_space_size=8192 WORKING_MODE=cli node --inspect dist/src/main prove", + "prove": "NODE_OPTIONS=--max_old_space_size=8192 WORKING_MODE=cli node dist/main prove", + "prove:debug": "NODE_OPTIONS=--max_old_space_size=8192 WORKING_MODE=cli node --inspect dist/main prove", "slashing": "yarn prove slashing", "slashing:debug": "yarn prove:debug slashing", "withdrawal": "yarn prove withdrawal", @@ -19,7 +19,7 @@ "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", - "start:prod": "NODE_OPTIONS=--max_old_space_size=8192 node dist/src/main", + "start:prod": "NODE_OPTIONS=--max_old_space_size=8192 node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\"", "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",