Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
import os
|
2 |
-
import stat
|
3 |
|
4 |
if __name__ == "__main__":
|
5 |
-
#
|
6 |
-
|
7 |
-
os.
|
8 |
-
|
9 |
-
# Run the shell script to start the Flask app with Gunicorn
|
10 |
-
os.system(script_path)
|
|
|
1 |
import os
|
|
|
2 |
|
3 |
if __name__ == "__main__":
|
4 |
+
# Run the Flask app using Gunicorn in the background with nohup
|
5 |
+
command = "nohup gunicorn -w 4 -b 0.0.0.0:7860 myapp:myapp > gunicorn_output.log 2>&1 &"
|
6 |
+
os.system(command)
|
|
|
|
|
|