Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Dockerfile #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:18.15.0-alpine3.17 AS base

RUN apk update && apk add git
RUN npm i -g pnpm

FROM base AS dependencies

WORKDIR /app
#COPY . .
COPY lefthook.yml package.json pnpm-lock.yaml ./
COPY .git .git
RUN pnpm install

FROM base AS build

WORKDIR /app
COPY . .
COPY --from=dependencies /app/node_modules ./node_modules
RUN pnpm build

FROM base AS deploy

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