develop #21

Merged
darroyo merged 3 commits from develop into main 2026-03-25 02:08:05 +00:00
Showing only changes of commit ef8a7858b2 - Show all commits

View File

@@ -9,22 +9,13 @@ echo "Checking database..."
mkdir -p /app/data mkdir -p /app/data
chmod 777 /app/data chmod 777 /app/data
# Create a dummy file to test write access # Only run db push if database file doesn't exist
touch /app/data/.write_test 2>/dev/null && rm /app/data/.write_test || { if [ ! -f /app/data/dev.db ]; then
echo "Warning: Cannot write to /app/data, trying to fix permissions..." echo "Database not found, creating..."
chmod -R 777 /app/data ./node_modules/prisma/build/index.js db push --skip-generate
} else
echo "Database already exists, skipping db push..."
# Use local prisma version from node_modules (skip generate - already built) fi
./node_modules/prisma/build/index.js db push --skip-generate || {
echo "Warning: db push failed, checking if database exists..."
if [ -f /app/data/dev.db ]; then
echo "Database file exists, continuing..."
else
echo "Database file does not exist and could not be created"
exit 1
fi
}
echo "Starting application..." echo "Starting application..."
exec "$@" exec "$@"