1
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user