-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from drift-labs/master
sync staging
- Loading branch information
Showing
5 changed files
with
15 additions
and
65 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,19 @@ | ||
FROM node:20.18.1 AS builder | ||
FROM public.ecr.aws/bitnami/node:20.18.1 | ||
RUN apt-get install git | ||
ENV NODE_ENV=production | ||
RUN npm install -g typescript | ||
|
||
WORKDIR /app | ||
|
||
# Copy package files first to leverage cache | ||
COPY package.json yarn.lock ./ | ||
COPY drift-common/protocol/sdk/package.json ./drift-common/protocol/sdk/ | ||
COPY drift-common/common-ts/package.json ./drift-common/common-ts/ | ||
|
||
RUN npm install -g bun typescript husky | ||
|
||
COPY drift-common /app/drift-common | ||
COPY . . | ||
WORKDIR /app/drift-common/protocol/sdk | ||
COPY drift-common/protocol/sdk/ . | ||
RUN bun install && bun run build | ||
|
||
RUN yarn | ||
RUN yarn build | ||
WORKDIR /app/drift-common/common-ts | ||
COPY drift-common/common-ts/ . | ||
RUN bun install && bun run build | ||
|
||
RUN yarn | ||
RUN yarn build | ||
WORKDIR /app | ||
COPY . . | ||
# no '--production' for esbuild | ||
RUN bun install && bun esbuild.config.js | ||
|
||
FROM node:20.18.1-alpine | ||
# 'bigint-buffer' native lib for performance | ||
# @triton-one/yellowstone-grpc so .wasm lib included | ||
RUN apk add python3 make g++ --virtual .build &&\ | ||
npm install -C /lib bigint-buffer @triton-one/yellowstone-grpc &&\ | ||
apk del .build | ||
COPY --from=builder /app/lib/ ./lib/ | ||
RUN yarn | ||
RUN yarn build | ||
|
||
ENV NODE_ENV=production | ||
EXPOSE 9464 | ||
|
||
CMD ["node", "./lib/index.js"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters