Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN pip install poetry
RUN poetry config virtualenvs.create false

# Install the dependencies
RUN poetry install --no-root --no-dev
RUN poetry install --all-extras --no-root --no-dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve Poetry installation and dependency management.

  1. The Poetry version should be pinned for reproducibility
  2. Consider specifying only required extras instead of --all-extras to minimize image size

Apply these improvements:

-RUN pip install poetry
+RUN pip install poetry==1.6.1
 
 RUN poetry config virtualenvs.create false
 
-RUN poetry install --all-extras --no-root --no-dev
+# Only install postgresql extra since that's what we're adding
+RUN poetry install --extras postgresql --no-root --no-dev

Committable suggestion was skipped due to low confidence.



# Set the PYTHONPATH environment variable to include the /app directory
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,22 @@ If you have questions, join our <a href="https://discord.gg/NQPKmU5CCg">Discord
pip install cognee
```

### With pip with PostgreSQL support
```bash
pip install cognee[postgres]
```

### With poetry

```bash
poetry add cognee
```

### With poetry with PostgreSQL support

```bash
poetry add cognee -E postgres
```

## 💻 Basic Usage

Expand Down Expand Up @@ -73,6 +82,18 @@ docker-compose up
```
Then navigate to localhost:3000

If you want to use the UI with PostgreSQL through docker-compose make sure to set the following values in the .env file:
```
DB_PROVIDER=postgres

DB_HOST=postgres
DB_PORT=5432

DB_NAME=cognee_db
DB_USERNAME=cognee
DB_PASSWORD=cognee
```

### Simple example

Run the default cognee pipeline:
Expand Down
Loading