Skip to content

Commit

Permalink
feat: add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
arianrhodsandlot committed Dec 20, 2023
1 parent 6715715 commit 76429de
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.gitignore
*.md
dist
node_modules
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN apk add git && corepack enable && pnpm i -g serve
COPY . /app
WORKDIR /app

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm i --frozen-lockfile
RUN pnpm build

FROM base
COPY --from=build /app/dist /app/dist
EXPOSE 3000
CMD serve dist

0 comments on commit 76429de

Please sign in to comment.