Files
toir-light/server/docker-entrypoint.sh
MaKarin 5000e6baa0 push
2026-04-03 22:15:10 -07:00

13 lines
349 B
Bash

#!/bin/sh
set -eu
if [ -d "prisma/migrations" ] && [ -n "$(find prisma/migrations -mindepth 1 -maxdepth 1 -type d 2>/dev/null)" ]; then
echo "Applying Prisma migrations with migrate deploy..."
npx prisma migrate deploy
else
echo "No Prisma migrations found, syncing schema with db push..."
npx prisma db push
fi
exec node dist/src/main.js