Merge pull request #2 from kaiffeetasse/main

feat: add docker support
This commit is contained in:
WangYK
2025-02-13 10:18:59 +08:00
committed by GitHub
2 changed files with 34 additions and 0 deletions

22
Dockerfile Normal file
View File

@ -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"]

View File

@ -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