Skip to content

Commit

Permalink
dockerfile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyek committed Mar 19, 2024
1 parent 69c26f5 commit d07f6cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 9 additions & 11 deletions projects/scrape-txs/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM oven/bun:1 as build
FROM node:18-buster-slim as build
WORKDIR /app
COPY ./package.json ./bun.lockb ./
RUN bun install
COPY ./package.json ./
RUN npm install
COPY ./src ./src
COPY ./tsconfig.json ./tsconfig.build.json ./
RUN bun tsc --project tsconfig.build.json
RUN npm run build

# runner

Expand All @@ -21,19 +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}

RUN bun install aws-lambda-ric

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

COPY --from=build /app/dist ./

ENTRYPOINT ["/usr/bin/npx", "aws-lambda-ric"]
CMD ["./lambda.handler"]
CMD ["lambda.handler"]
3 changes: 3 additions & 0 deletions projects/scrape-txs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "scrape-txs",
"type": "module",
"scripts": {
"build": "tsc --project tsconfig.build.json"
},
"devDependencies": {
"@tsconfig/node20": "~20.1.2",
"@tsconfig/strictest": "~2.0.3",
Expand Down

0 comments on commit d07f6cb

Please sign in to comment.