Spaces:
Paused
Paused
File size: 578 Bytes
2af848d c4fdc5d 85caf0a c4fdc5d 96ce0e1 c4fdc5d 2af848d c4fdc5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/bin/bash
# Start Nginx
service nginx start
# Start the Python HTTP server to serve static files
python -m http.server --directory ./static --bind 0.0.0.0 8000 & echo $! > http_server.pid
# Start the Uvicorn server for the backend
uvicorn "app:app" --port 7860 --host 0.0.0.0 &
# Start the Unity game server using xvfb-run
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' /home/pn/app/build/linuxBuild.x86_64 -batchmode -nographics -port 7777 &
# Wait for Uvicorn to finish
wait
# Stop the Python HTTP server
pkill -F http_server.pid
rm http_server.pid
|