start.sh 290 B

12345678910111213141516
  1. #!/bin/sh
  2. set -e
  3. # Start nginx in background
  4. nginx &
  5. NGINX_PID=$!
  6. # Start backend
  7. uvicorn main:app --host 0.0.0.0 --port 8080 &
  8. UVICORN_PID=$!
  9. # Wait for either process to exit
  10. wait $NGINX_PID $UVICORN_PID
  11. # If one exits, kill the other
  12. kill $NGINX_PID $UVICORN_PID 2>/dev/null || true