Spaces:
Runtime error
Runtime error
Commit
·
b0701b4
1
Parent(s):
6f699a8
Create start.sh
Browse files
start.sh
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Start Nginx and output to /dev/null
|
4 |
+
service nginx start &> /dev/null
|
5 |
+
|
6 |
+
# Check if Nginx started successfully
|
7 |
+
if [ $? -ne 0 ]; then
|
8 |
+
echo "Nginx failed to start"
|
9 |
+
echo "Nginx error log:"
|
10 |
+
cat /var/log/nginx/error.log
|
11 |
+
exit 1
|
12 |
+
fi
|
13 |
+
|
14 |
+
# If Nginx started successfully, then start the Flask application
|
15 |
+
python app.py
|