Added docker file for building app
This commit is contained in:
parent
39bb647b5c
commit
a1c8dd80ec
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM node:18-alpine AS builder
|
||||||
|
|
||||||
|
# Enable corepack and install pnpm
|
||||||
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
# Disable interactive prompts
|
||||||
|
ENV CI=true
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build
|
||||||
|
RUN pnpm install && pnpm build
|
||||||
|
|
||||||
|
FROM node:18-alpine AS runner
|
||||||
|
|
||||||
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=builder /app ./
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["pnpm", "start"]
|
||||||
Loading…
x
Reference in New Issue
Block a user