Files
network-app-api/entrypoint.sh

18 lines
359 B
Bash

#!/bin/bash
set -e
# One-time DB reset (remove this block after running)
if [ "$RESET_DB" = "true" ]; then
echo "🔴 RESETTING DATABASE..."
bun run src/reset-db.ts
echo "✅ Database reset complete"
fi
# Push schema
echo "Running db:push..."
bun run db:push || echo "db:push skipped"
# Start the app
echo "Starting API..."
exec bun run src/index.ts