File size: 411 Bytes
be4e426 e028bb8 bc38ec6 f8336d8 2c2ef3a f8336d8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#!/bin/bash
# Start Nginx service
service nginx start
# Check if Nginx started successfully
if [ $? -ne 0 ]; then
echo "Failed to start Nginx. Logging error log:"
cat /var/log/nginx/error.log
exit 1
fi
# Start Gunicorn for the Flask app
gunicorn --bind 0.0.0.0:8080 api_app:app &
# Start Gunicorn for the Gradio frontend
python spaces_app.py &
# Wait for all background processes to finish
wait |