Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] docker-compose default persistent directory path updated #1046

Merged
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

index_data

# Default configuration for persist_directory in chromadb/config.py
# Currently it's located in "./chroma/"
chroma/

venv
.env
.chroma
Expand Down
8 changes: 5 additions & 3 deletions docker-compose.server.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ services:
server:
image: ghcr.io/chroma-core/chroma:latest
volumes:
- index_data:/chroma/.chroma/index
# Default configuration for persist_directory in chromadb/config.py
# Currently it's located in "/chroma/chroma/"
- chroma_persistent_folder:/chroma/chroma/
ports:
- 8000:8000
networks:
- net

volumes:
index_data:
driver: local
backups:
driver: local
chroma_persistent_folder:
driver: local
7 changes: 3 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ services:
dockerfile: Dockerfile
volumes:
- ./:/chroma
- index_data:/index_data
# Be aware that indexed data are located in "/chroma/chroma/"
# Default configuration for persist_directory in chromadb/config.py
command: uvicorn chromadb.app:app --reload --workers 1 --host 0.0.0.0 --port 8000 --log-config log_config.yml
environment:
- IS_PERSISTENT=TRUE
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should go one step further and instead of simply removing the dir we should instead add - PERSIST_DIRECTORY=${PERSIST_DIRECTORY:-/chroma/chroma} while this is not a huge change it does give the indication to someone reading the docker compose where is actually data persisted without having to read through the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated thanks for the suggestion I agree that it's clearly more useful and explicit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

great suggestion!

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Benvii did this suggestion get rewinded?

Expand All @@ -26,7 +27,5 @@ services:
- net

volumes:
index_data:
driver: local
backups:
driver: local
driver: local