mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 12:40:09 +01:00
wip storage workarounds
This commit is contained in:
parent
491b8391db
commit
ade82f5776
@ -2,13 +2,13 @@
|
|||||||
# This is the entrypoint for Render.com docker builds. Do not use for targeting
|
# This is the entrypoint for Render.com docker builds. Do not use for targeting
|
||||||
# in other service docker builds
|
# in other service docker builds
|
||||||
|
|
||||||
if test -f "$STORAGE_DIR/.env"; then
|
|
||||||
export $(xargs < "$STORAGE_DIR/.env")
|
|
||||||
echo $STORAGE_DIR
|
|
||||||
|
|
||||||
# Copy pre-built assets into storage dir.
|
# Copy pre-built assets into storage dir.
|
||||||
cp -r /app/server/storage/assets/ "$STORAGE_DIR/assets"
|
cp -r /app/server/storage/assets/ "$STORAGE_DIR/assets"
|
||||||
fi
|
mkdir -p "$STORAGE_DIR/documents"
|
||||||
|
mkdir -p "$STORAGE_DIR/models"
|
||||||
|
mkdir -p "$STORAGE_DIR/vector-cache"
|
||||||
|
mkdir -p "$STORAGE_DIR/assets"
|
||||||
|
touch "$STORAGE_DIR/anythingllm.db"
|
||||||
|
|
||||||
{ cd /app/server/ &&\
|
{ cd /app/server/ &&\
|
||||||
npx prisma generate --schema=./prisma/schema.prisma &&\
|
npx prisma generate --schema=./prisma/schema.prisma &&\
|
||||||
|
@ -12,7 +12,7 @@ generator client {
|
|||||||
// }
|
// }
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "sqlite"
|
provider = "sqlite"
|
||||||
url = "file:../storage/anythingllm.db"
|
url = "file:/storage/anythingllm.db"
|
||||||
}
|
}
|
||||||
|
|
||||||
model api_keys {
|
model api_keys {
|
||||||
|
@ -7,10 +7,7 @@ function setupMulter() {
|
|||||||
// Handle File uploads for auto-uploading.
|
// Handle File uploads for auto-uploading.
|
||||||
const storage = multer.diskStorage({
|
const storage = multer.diskStorage({
|
||||||
destination: function (_, __, cb) {
|
destination: function (_, __, cb) {
|
||||||
const uploadOutput =
|
const uploadOutput = path.resolve(__dirname, `../../../collector/hotdir`);
|
||||||
process.env.NODE_ENV === "development"
|
|
||||||
? path.resolve(__dirname, `../../../collector/hotdir`)
|
|
||||||
: path.resolve(process.env.STORAGE_DIR, `../../collector/hotdir`);
|
|
||||||
cb(null, uploadOutput);
|
cb(null, uploadOutput);
|
||||||
},
|
},
|
||||||
filename: function (_, file, cb) {
|
filename: function (_, file, cb) {
|
||||||
|
Loading…
Reference in New Issue
Block a user