Dockerfile 추가

This commit is contained in:
static
2024-12-28 13:05:59 +09:00
parent c00dbe7024
commit 796e4a7831
3 changed files with 64 additions and 1 deletions

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
# Build Stage
FROM node:18-alpine AS build
WORKDIR /app
RUN npm install -g pnpm@8
COPY pnpm-lock.yaml .
RUN pnpm fetch
COPY . .
RUN pnpm install --offline
RUN pnpm build
# Deploy Stage
FROM node:18-alpine
WORKDIR /app
RUN npm install -g pnpm@8
COPY pnpm-lock.yaml .
RUN pnpm fetch --prod
COPY package.json .
RUN pnpm install --offline --prod
COPY --from=build /app/build ./build
EXPOSE 3000
CMD ["node", "./build/index.js"]