- Add backend entrypoint with automated Prisma migrations and client regeneration - Add frontend entrypoint with dependency management - Update Dockerfiles to use entrypoint scripts - Ensures database schema stays in sync with Prisma Client after migrations
18 lines
421 B
Bash
18 lines
421 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "🔧 Checking dependencies..."
|
|
|
|
# Install dependencies if node_modules doesn't exist or package.json changed
|
|
if [ ! -d "node_modules" ] || [ "package.json" -nt "node_modules" ]; then
|
|
echo "📦 Installing npm dependencies..."
|
|
npm install
|
|
else
|
|
echo "✅ Dependencies already installed"
|
|
fi
|
|
|
|
echo "✅ Ready to start!"
|
|
|
|
# Execute the main command (passed as arguments to this script)
|
|
exec "$@"
|