From 5c3c28009f47b3cffa6cde507f96244345b5dd10 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 26 Mar 2024 05:45:20 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20Update=20Docker=20Docs?= =?UTF-8?q?=20&=20Make=20`cache`=20field=20Optional=20for=20Custom=20Confi?= =?UTF-8?q?g=20(#2211)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: updating docker * fix(customConfig): make `cache` field optional as intended (though not recommended for local setups) --- .../installation/docker_compose_install.md | 30 ++++++++++++++----- packages/data-provider/src/config.ts | 2 +- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/install/installation/docker_compose_install.md b/docs/install/installation/docker_compose_install.md index 42142cc16..5b72f1cc6 100644 --- a/docs/install/installation/docker_compose_install.md +++ b/docs/install/installation/docker_compose_install.md @@ -54,30 +54,46 @@ That's it! If you need more detailed information on configuring your compose fil The following commands will fetch the latest code of LibreChat and build a new docker image. ```bash -git pull +# Stop the running container(s) docker compose down -docker compose up --build + +# Pull latest project changes +git pull + +# Pull the latest LibreChat image (default setup) +docker compose pull + +# Start LibreChat +docker compose up ``` -If you're having issues running this command, you can try running what the script does manually: +If you're having issues running the above commands, you can try a comprehensive approach: Prefix commands with `sudo` according to your environment permissions. ```bash # Stop the container (if running) docker compose down + # Switch to the repo's main branch git checkout main + # Pull the latest changes to the main branch from Github -git pull +git pull + # Prune all LibreChat Docker images docker rmi librechat:latest -# Remove all unused dangling Docker images. + +# Optional: Remove all unused dangling Docker images. # Be careful, as this will delete all dangling docker images on your # computer, also those not created by LibreChat! docker image prune -f -# Building a new LibreChat image without cache -docker compose build --no-cache + +# If building the LibreChat image Locally, build without cache (legacy setup) +# docker compose build --no-cache + +# Pull the latest image (default setup) +docker compose pull # Start LibreChat docker compose up diff --git a/packages/data-provider/src/config.ts b/packages/data-provider/src/config.ts index 4ebff8f63..e1b9271e9 100644 --- a/packages/data-provider/src/config.ts +++ b/packages/data-provider/src/config.ts @@ -185,7 +185,7 @@ export const rateLimitSchema = z.object({ export const configSchema = z.object({ version: z.string(), - cache: z.boolean(), + cache: z.boolean().optional().default(true), interface: z .object({ privacyPolicy: z