Skip to content

Commit

Permalink
feat: Dockerfile for running liquidation bot
Browse files Browse the repository at this point in the history
  • Loading branch information
piesrtasty committed Nov 8, 2023
1 parent 695c42c commit 745b67a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 745b67a

Please sign in to comment.