#!/bin/bash set -e # Initialize database if it doesn't exist or schema changed echo "Checking database..." # Ensure data directory exists with proper permissions mkdir -p /app/data # Use local prisma version from node_modules ./node_modules/prisma/build/index.js db push echo "Starting application..." exec su nextjs -c "cd /app && node server.js"