* feat: add postgres to docker compose * feat: run migrations via entrypoint * chore: tidy .env.example * fix: allow empty strings for optional envs * fix: remove external from kan-network * chore: update readme
16 lines
457 B
Bash
16 lines
457 B
Bash
#!/bin/sh
|
|
|
|
# Run migrations from the Turborepo root context
|
|
echo "Running database migrations..."
|
|
# Navigate to the Turborepo root to run the db:migrate command
|
|
pnpm --prefix /app db:migrate
|
|
|
|
# Check if migration was successful
|
|
if [ $? -ne 0 ]; then
|
|
echo "\nDatabase migration failed! Exiting."
|
|
exit 1
|
|
fi
|
|
|
|
echo "\nStarting Next.js application..."
|
|
# Start the Next.js application from the web app's directory
|
|
exec node .next/standalone/apps/web/server.js |