Warn bad docker command (#3827)

* Add context window finder from litellm maintained list
apply to all cloud providers, have client cache for 3 days

* docker container bootup warning

* update invalid ENV warning

* rebased with current HEAD

* update newline printing
This commit is contained in:
Timothy Carambat
2025-05-14 11:01:10 -07:00
committed by GitHub
parent 092e7afda2
commit 4445f39bf8
2 changed files with 19 additions and 2 deletions

View File

@@ -1,4 +1,21 @@
#!/bin/bash
# Check if STORAGE_DIR is set
if [ -z "$STORAGE_DIR" ]; then
echo "================================================================"
echo "⚠️ ⚠️ ⚠️ WARNING: STORAGE_DIR environment variable is not set! ⚠️ ⚠️ ⚠️"
echo ""
echo "Not setting this will result in data loss on container restart since"
echo "the application will not have a persistent storage location."
echo "It can also result in weird errors in various parts of the application."
echo ""
echo "Please run the container with the official docker command at"
echo "https://docs.anythingllm.com/installation-docker/quickstart"
echo ""
echo "⚠️ ⚠️ ⚠️ WARNING: STORAGE_DIR environment variable is not set! ⚠️ ⚠️ ⚠️"
echo "================================================================"
fi
{
cd /app/server/ &&
npx prisma generate --schema=./prisma/schema.prisma &&
@@ -7,4 +24,4 @@
} &
{ node /app/collector/index.js; } &
wait -n
exit $?
exit $?