-
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.
fix issues from #new-listing-dev thread use yarn workspaces for package install
- Loading branch information
1 parent
b129bfe
commit 8bea223
Showing
5 changed files
with
299 additions
and
103 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*/**/node_modules/ | ||
*/**/lib/ | ||
*/**/tests/ | ||
.husky/ |
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,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/[email protected] &&\ | ||
apk del .build &&\ | ||
rm -rf /root/.cache/ /root/.npm /usr/local/lib/node_modules | ||
|
||
ENV NODE_ENV=production | ||
EXPOSE 9464 |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const esbuild = require('esbuild'); | ||
const glob = require('tiny-glob'); | ||
|
||
const commonConfig = { | ||
bundle: true, | ||
platform: 'node', | ||
target: 'node20', | ||
sourcemap: false, | ||
minify: false, // makes messy debug/error output | ||
treeShaking: true, | ||
legalComments: 'none', | ||
metafile: true, | ||
format: 'cjs', | ||
external: [ | ||
'bigint-buffer', | ||
'@triton-one/yellowstone-grpc' | ||
] | ||
}; | ||
|
||
(async () => { | ||
let entryPoints = await glob("./src/**/*.ts"); | ||
await esbuild.build({ | ||
...commonConfig, | ||
entryPoints, | ||
outdir: 'lib', | ||
}); | ||
})().catch(() => process.exit(1)); |
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
Oops, something went wrong.