File size: 1,100 Bytes
f8b5d42 1c4b8f7 781fb36 f8b5d42 781fb36 f8b5d42 781fb36 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
#!/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 $? |