Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 committed Dec 24, 2024
1 parent d93c076 commit 314c481
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.18.1 AS builder
FROM public.ecr.aws/docker/library/node:20 AS builder
RUN npm install -g husky

COPY package.json yarn.lock ./
Expand All @@ -9,11 +9,12 @@ COPY . .
RUN yarn install
RUN node esbuild.config.js

FROM node:20.18.1-alpine
FROM public.ecr.aws/docker/library/node:20.18.1-alpine
# 'bigint-buffer' native lib for performance
RUN apk add python3 make g++ --virtual .build &&\
npm install -C /lib bigint-buffer &&\
apk del .build
npm install -C /lib bigint-buffer @triton-one/yellowstone-grpc@1.3.0 &&\
apk del .build &&\
rm -rf /root/.cache/ /root/.npm /usr/local/lib/node_modules
COPY --from=builder /app/lib/ ./lib/

EXPOSE 9464
Expand Down
6 changes: 3 additions & 3 deletions esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ const commonConfig = {
// minify: true, makes messy debug/error output
treeShaking: true,
legalComments: 'none',
mainFields: ['module', 'main'],
metafile: true,
format: 'cjs',
external: [
'bigint-buffer'
'bigint-buffer',
'@triton-one/yellowstone-grpc'
]
};

(async () => {
let entryPoints = await glob("./src/*.ts", { filesOnly: true });
let entryPoints = await glob("./src/**/*.ts");
await esbuild.build({
...commonConfig,
entryPoints,
Expand Down

0 comments on commit 314c481

Please sign in to comment.