develop #21

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

View File

@@ -9,13 +9,17 @@ echo "Checking database..."
mkdir -p /app/data
chmod 777 /app/data
# Only run db push if database file doesn't exist
if [ ! -f /app/data/dev.db ]; then
echo "Database not found, creating..."
./node_modules/prisma/build/index.js db push --skip-generate
# Run db push (creates/updates database schema)
# If it fails due to OOM but DB exists, continue anyway
./node_modules/prisma/build/index.js db push --skip-generate || {
exit_code=$?
if [ -f /app/data/dev.db ]; then
echo "db push failed (code $exit_code) but database exists, continuing..."
else
echo "Database already exists, skipping db push..."
echo "db push failed and database does not exist"
exit $exit_code
fi
}
echo "Starting application..."
exec "$@"