Skip to content

Commit

Permalink
v2hn: add dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed Aug 6, 2024
1 parent 2734a09 commit ff8cb5d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/v2-hop-node/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
Dockerfile
*.env
*.tsbuildinfo
17 changes: 17 additions & 0 deletions packages/v2-hop-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:20.12.2-slim AS base
ARG GIT_REV
ENV GIT_REV=${GIT_REV} PNPM_HOME="/pnpm" PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter-prod=v2-hop-node... install

RUN pnpm --filter=v2-hop-node... build
RUN pnpm --filter=v2-hop-node deploy --prod /prod/app

FROM base
COPY --from=build /prod/app /prod/app
WORKDIR /prod/app
ENTRYPOINT ["node", "/prod/app/dist/cli/cli.js"]

0 comments on commit ff8cb5d

Please sign in to comment.