esbuildify again

fix issues from #new-listing-dev thread
use yarn workspaces for package install
This commit is contained in:
jordy25519
2024-12-18 11:28:01 +08:00
parent b129bfed74
commit 8bea223f27
5 changed files with 299 additions and 103 deletions

View File

@@ -1,19 +1,23 @@
FROM public.ecr.aws/bitnami/node:20.18.1
RUN apt-get install git
ENV NODE_ENV=production
RUN npm install -g typescript
FROM public.ecr.aws/docker/library/node:20 AS builder
RUN npm install -g typescript bun
WORKDIR /app
COPY drift-common /app/drift-common
COPY . .
RUN bun install
WORKDIR /app/drift-common/protocol/sdk
RUN yarn
RUN yarn build
WORKDIR /app/drift-common/common-ts
RUN yarn
RUN yarn build
WORKDIR /app
RUN yarn
RUN yarn build
RUN bun esbuild.config.js
FROM public.ecr.aws/docker/library/node:20-alpine
COPY --from=builder /app/lib/ ./lib/
RUN apk add --virtual .build python3 g++ make &&\
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
ENV NODE_ENV=production
EXPOSE 9464