diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3e2ecc1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM node:20-alpine AS builder + +WORKDIR /app + +COPY package.json pnpm-lock.yaml ./ +RUN npm i -g --force pnpm@9 +RUN pnpm install --frozen-lockfile + +COPY . . +ENV NODE_OPTIONS="--max_old_space_size=2048" +RUN pnpm build + +FROM node:20-alpine AS runner + +WORKDIR /app + +# We only need the `.output` directory, which contains everything the app needs to run +COPY --from=builder /app/.output .output +COPY --from=builder /app/package.json . + +EXPOSE 3000 +CMD ["node", ".output/server/index.mjs"] diff --git a/README.md b/README.md index 380b684..983ec24 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,18 @@ yarn preview bun run preview ``` +### Docker + +Build the Docker image: +``` +docker build -t deep-research-web . +``` + +Run the Docker image: +``` +docker run -p 3000:3000 deep-research-web +``` + Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. ## License