Spaces:
Runtime error
Runtime error
# Start Nginx and output to /dev/null | |
service nginx start &> /dev/null | |
# Check if Nginx started successfully | |
if [ $? -ne 0 ]; then | |
echo "Nginx failed to start" | |
echo "Nginx error log:" | |
cat /var/log/nginx/error.log | |
exit 1 | |
fi | |
# If Nginx started successfully, then start the Flask application | |
python app.py | |