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