diff --git a/Dockerfile b/Dockerfile index e69de29..b6b13f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM node:18 as build + +WORKDIR /app + +COPY package.json ./ + +RUN yarn install + +COPY . . + +RUN yarn run build + +FROM node:18-slim + +WORKDIR /app + +COPY --from=build /app/package.json /app/yarn.lock ./ +COPY --from=build /app/tsconfig.json ./ +COPY --from=build /app/dist ./dist +COPY --from=build /app/node_modules ./node_modules + +CMD [ "yarn", "run", "prod:liquidation"] \ No newline at end of file diff --git a/package.json b/package.json index 4f7430b..a7e4147 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "build": "yarn run compile-contracts && tsc", "prod:data-time-fetch": "node dist/oracles.js", "prod:data-twap-fetch": "node dist/pid-controller.js", + "prod:liquidation": "node dist/src/liquidation.js", "lint:check": "yarn lint", "lint:fix": "yarn lint --fix", "lint": "eslint ./src"