Compare commits

..

4 Commits

Author SHA1 Message Date
e225f2ec2c Merge pull request 'develop' (#21) from develop into main
All checks were successful
Personal/recall/pipeline/head This commit looks good
Reviewed-on: #21
2026-03-25 02:08:04 +00:00
85bbe7b61f fix: Increase memory limit to 512MB for Prisma db push 2026-03-24 23:07:10 -03:00
de1de1d3bc fix: Run prisma db push but continue if OOM and DB exists 2026-03-24 23:04:26 -03:00
ef8a7858b2 fix: Only run prisma db push if database doesn't exist to avoid OOM 2026-03-24 23:02:14 -03:00
2 changed files with 8 additions and 13 deletions

4
Jenkinsfile vendored
View File

@@ -90,8 +90,8 @@ services:
- ./data:/app/data
networks:
- homelab-net
mem_limit: 32m
mem_reservation: 16m
mem_limit: 512m
mem_reservation: 256m
restart: unless-stopped
networks:
homelab-net:

View File

@@ -9,20 +9,15 @@ echo "Checking database..."
mkdir -p /app/data
chmod 777 /app/data
# Create a dummy file to test write access
touch /app/data/.write_test 2>/dev/null && rm /app/data/.write_test || {
echo "Warning: Cannot write to /app/data, trying to fix permissions..."
chmod -R 777 /app/data
}
# Use local prisma version from node_modules (skip generate - already built)
# 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 || {
echo "Warning: db push failed, checking if database exists..."
exit_code=$?
if [ -f /app/data/dev.db ]; then
echo "Database file exists, continuing..."
echo "db push failed (code $exit_code) but database exists, continuing..."
else
echo "Database file does not exist and could not be created"
exit 1
echo "db push failed and database does not exist"
exit $exit_code
fi
}