Files
anything-llm/docker/docker-entrypoint.sh
Timothy Carambat 4445f39bf8 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
2025-05-14 11:01:10 -07:00

27 lines
1.1 KiB
Bash
Executable File

#!/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 &&
npx prisma migrate deploy --schema=./prisma/schema.prisma &&
node /app/server/index.js
} &
{ node /app/collector/index.js; } &
wait -n
exit $?