mosha255 commited on
Commit
e028bb8
·
unverified ·
1 Parent(s): ce47262

Debug nginx startup

Browse files
Files changed (1) hide show
  1. startup.sh +13 -1
startup.sh CHANGED
@@ -1,2 +1,14 @@
1
  #!/bin/bash
2
- service nginx start && gunicorn --bind 0.0.0.0:8080 server:app
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
+
3
+ # Start Nginx service
4
+ service nginx start
5
+
6
+ # Check if Nginx started successfully
7
+ if [ $? -ne 0 ]; then
8
+ echo "Failed to start Nginx. Logging error log:"
9
+ cat /var/log/nginx/error.log
10
+ exit 1
11
+ fi
12
+
13
+ # Start Gunicorn for the Flask app
14
+ gunicorn --bind 0.0.0.0:8080 server:app