diff --git a/docker/HOW_TO_USE_DOCKER.md b/docker/HOW_TO_USE_DOCKER.md new file mode 100644 index 0000000000000000000000000000000000000000..980e8bd76f62d742a3e8420a747724ef1e3464b8 --- /dev/null +++ b/docker/HOW_TO_USE_DOCKER.md @@ -0,0 +1,50 @@ +# How to use Dockerized Anything LLM + +Use the Dockerized version of AnythingLLM for a much faster and complete startup of AnythingLLM. + +## Requirements +- Install [Docker](https://www.docker.com/) on your computer or machine. + +## How to install +- `git clone` this repo and `cd anything-llm` to get to the root directory. +- `yarn setup:envs` from repo root & fill out the `.env` file that is then created in `./docker/` +- `cd docker/` +- `docker-compose up -d --build` to build the image - this will take a few moments. + +Your docker host will show the image as online one the build process is completed. This will build the app to `http://localhost:3001`. + +## How to use the user interface +- To access the full application visit `http://localhost:3001` in your browser. + +## How to add files to my system +- To run the collector scripts to grab external data (articles, URLs, etc) + - `docker exec -it --workdir=/app/collector anything-llm python main.py` + +- To run the collector on local documents you want to provide to it + - `docker exec -it --workdir=/app/collector anything-llm python watch.py` + - Upload [compliant files](../collector/hotdir/__HOTDIR__.md) to `./collector/hotdir` and they will be processed and made available in the UI. + +## How to update and rebuild the ENV? +- Update the `./docker/.env` and run `docker-compose up -d --build` to rebuild with new environments. + + +## âš ï¸ Vector DB support âš ï¸ +Out of the box all vector databases are supported. Any vector databases requiring special configuration are listed below. + +### Using local ChromaDB with Dockerized AnythingLLM +- Ensure in your `./docker/.env` file that you have +``` +#./docker/.env +...other configs + +VECTOR_DB="chroma" +CHROMA_ENDPOINT='http://host.docker.internal:8000' # Allow docker to look on host port, not container. + +...other configs + +``` + +## Still not working? +[Ask for help on Discord](https://discord.gg/6UyHPeGZAC) + + diff --git a/package.json b/package.json index 5aea62b7360b0f48ac0c13398a81018138bde2bd..151dcd4597a37d96932b0e21a9b650fc47e457f0 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "scripts": { "lint": "cd server && yarn lint && cd .. && cd frontend && yarn lint", "setup": "cd server && yarn && cd ../frontend && yarn && cd .. && yarn setup:envs && echo \"Please run yarn dev:server and yarn dev:frontend in separate terminal tabs.\"", - "setup:envs": "cd server && cp -n .env.example .env.development && cd ../collector && cp -n .env.example .env && cd ..", + "setup:envs": "cp -n ./server/.env.example ./server/.env.development && cp -n ./collector/.env.example ./collector/.env && cp -n ./docker/.env.example ./docker/.env && echo \"All ENV files copied!\n\"", "dev:server": "cd server && yarn dev", "dev:frontend": "cd frontend && yarn start", "prod:server": "cd server && yarn start", diff --git a/server/.gitignore b/server/.gitignore index 34040e1c0d75336e9dfa0640175abbf5142262fa..77fb41cab12eddee78a906fec7ea8a91e73934a9 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -6,4 +6,8 @@ storage/vector-cache/*.json logs/server.log *.db storage/lancedb -public/ \ No newline at end of file +public/ + +# For legacy copies of repo +documents +vector-cache \ No newline at end of file