Skip to content

Commit

Permalink
all node
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek committed Mar 19, 2024
1 parent 45fa17a commit fe785c7
Show file tree
Hide file tree
Showing 8 changed files with 2,907 additions and 30 deletions.
23 changes: 15 additions & 8 deletions projects/scrape-txs/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
FROM node:18-buster-slim as build
WORKDIR /app
COPY ./package.json package-lock.json ./
RUN npm install
COPY ./src ./src
COPY ./tsconfig.json ./tsconfig.build.json ./
RUN npm run build

# runner

FROM mcr.microsoft.com/playwright:v1.42.1-jammy

RUN apt-get update && \
Expand All @@ -11,20 +21,17 @@ RUN apt-get update && \
libcurl4-openssl-dev \
python3

RUN curl -fsSL https://bun.sh/install | bash
ENV PATH=$PATH:/root/.bun/bin

ENV NPM_CONFIG_CACHE=/tmp/.npm

ARG FUNCTION_DIR="/function"
RUN mkdir -p ${FUNCTION_DIR}
WORKDIR ${FUNCTION_DIR}

COPY ./package.json ./bun.lockb ./
RUN bun install
COPY ./package.json package-lock.json ./
RUN npm install --production
RUN npm install aws-lambda-ric

COPY lambda.js ./
COPY ./src ./src
COPY --from=build /app/dist ./

ENTRYPOINT ["/usr/bin/npx", "aws-lambda-ric"]
CMD ["./lambda.handler"]
CMD ["lambda.handler"]
Binary file removed projects/scrape-txs/bun.lockb
Binary file not shown.
16 changes: 0 additions & 16 deletions projects/scrape-txs/lambda.js

This file was deleted.

Loading

0 comments on commit fe785c7

Please sign in to comment.