Merge pull request #11 from 238SAMIxD/main

Add Dockerfile and docker compose
This commit is contained in:
David Zhang 2025-02-07 08:37:52 -08:00 committed by GitHub
commit 744a467ef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 71 additions and 0 deletions

5
.env.example Normal file
View File

@ -0,0 +1,5 @@
FIRECRAWL_KEY="YOUR_KEY"
# If you want to use your self-hosted Firecrawl, add the following below:
# FIRECRAWL_BASE_URL="http://localhost:3002"
OPENAI_KEY="YOUR_KEY"

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM node:18-alpine
WORKDIR /app
COPY . .
COPY package.json.docker ./package.json
COPY .env.local ./.env.local
RUN npm install
CMD ["npm", "start"]

View File

@ -83,6 +83,8 @@ flowchart TB
## Setup
### Node.js
1. Clone the repository
2. Install dependencies:
@ -100,6 +102,17 @@ FIRECRAWL_KEY="your_firecrawl_key"
OPENAI_KEY="your_openai_key"
```
### Docker
1. Clone the repository
2. Rename `.env.example` to `.env.local` and set your API keys
3. Run the Docker image:
```bash
docker compose run --rm deep-research
```
## Usage
Run the research assistant:

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
services:
deep-research:
build: .
env_file:
- .env.local
tty: true
stdin_open: true

34
package.json.docker Normal file
View File

@ -0,0 +1,34 @@
{
"name": "open-deep-research",
"version": "0.0.1",
"main": "index.ts",
"scripts": {
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
"tsx": "tsx --env-file=.env.local",
"start": "tsx src/run.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.13.0",
"prettier": "^3.4.2",
"tsx": "^4.19.2",
"typescript": "^5.7.3"
},
"dependencies": {
"@ai-sdk/openai": "^1.1.9",
"@mendable/firecrawl-js": "^1.16.0",
"ai": "^4.1.17",
"js-tiktoken": "^1.0.17",
"lodash-es": "^4.17.21",
"p-limit": "^6.2.0",
"zod": "^3.24.1"
},
"engines": {
"node": "22.x"
}
}