add deployment config for sb-on-demand-crank, fix BN import

This commit is contained in:
Riordan Panayides 2024-06-28 14:52:58 +01:00
parent e2841d72fc
commit 95ba57627e
3 changed files with 36 additions and 1 deletions

13
cd/switchboard-crank.toml Normal file
View File

@ -0,0 +1,13 @@
app = "switchboard-crank"
kill_signal = "SIGINT"
kill_timeout = 5
[build]
dockerfile = "../ts/client/scripts/Dockerfile.scripts"
[experimental]
cmd = ["yarn", "tsx", "ts/client/scripts/sb-on-demand-crank.ts"]
[[vm]]
size = "shared-cpu-1x"
memory = "512mb"

View File

@ -0,0 +1,22 @@
FROM node:18 as builder
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install
COPY ts ts
RUN ls
# scripts are run with tsx, no upfront build needed
# RUN yarn build
FROM node:18-slim as run
LABEL fly_launch_runtime="nodejs"
COPY --from=builder /app /app
WORKDIR /app
ENV NODE_ENV production

View File

@ -1,4 +1,4 @@
import { AnchorProvider, Wallet } from '@coral-xyz/anchor';
import { AnchorProvider, BN, Wallet } from '@coral-xyz/anchor';
import {
AccountInfo,
Cluster,