This commit is contained in:
urieljarethbusiness-cpu
2026-05-17 10:14:14 -06:00
parent d8773b2508
commit 64b3d15b90
61 changed files with 7612 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
export APP_DATA_DIR="${APP_DATA_DIR:-/app/data}"
export HOSTNAME="0.0.0.0"
uvicorn backend.app.main:app --host 127.0.0.1 --port 8000 &
backend_pid=$!
cleanup() {
kill "$backend_pid" 2>/dev/null || true
}
trap cleanup EXIT INT TERM
cd frontend
if [ -f ".next/standalone/server.js" ]; then
mkdir -p .next/standalone/.next
rm -rf .next/standalone/.next/static .next/standalone/public
cp -r .next/static .next/standalone/.next/static
if [ -d "public" ]; then
cp -r public .next/standalone/public
fi
cd .next/standalone
PORT="${PORT:-3000}" node server.js
else
npm run start -- --hostname 0.0.0.0 --port "${PORT:-3000}"
fi