diff --git a/Dockerfile b/Dockerfile index e69de29..7a36f70 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM node:20-alpine AS build + +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install + +COPY . . +RUN npm run build + +# Stage 2: Production +FROM node:20-alpine + +WORKDIR /app + +COPY --from=build /app/build ./build +COPY --from=build /app/package.json ./package.json + +RUN npm install --production + +EXPOSE 3000 + +CMD node build/index.js \ No newline at end of file