#!/bin/sh
set -e

# Start Nginx in the background
nginx &

# Run migrations
node /app/node_modules/.bin/tsx /app/packages/backend/src/migrate.ts

# Start the Node.js backend
exec node /app/node_modules/.bin/tsx /app/packages/backend/src/index.ts
