- #!/bin/sh
- set -e
- # Start nginx in background
- nginx &
- NGINX_PID=$!
- # Start backend
- uvicorn main:app --host 0.0.0.0 --port 8080 &
- UVICORN_PID=$!
- # Wait for either process to exit
- wait $NGINX_PID $UVICORN_PID
- # If one exits, kill the other
- kill $NGINX_PID $UVICORN_PID 2>/dev/null || true
|