Spaces:
Running
Running
File size: 483 Bytes
3f05344 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
#!/bin/bash
set -e
echo "Starting CUA2 Application..."
service nginx start
sleep 2
# Check if nginx is running
if ! pgrep nginx > /dev/null; then
echo "Error: nginx failed to start"
exit 1
fi
cd /app/cua2-core
# Set default number of workers if not specified
WORKERS=${WORKERS:-1}
echo "Starting backend with $WORKERS worker(s)..."
# Use uv to run the application
exec uv run uvicorn cua2_core.main:app --host 0.0.0.0 --port 8000 --workers $WORKERS --log-level info
|