Initial commit for deployment
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Activate virtual environment
|
||||
source venv/bin/activate
|
||||
|
||||
# Export environment variables
|
||||
export FLASK_APP=run.py
|
||||
export FLASK_ENV=production
|
||||
export FLASK_CONFIG=production
|
||||
|
||||
# Run the application with uvicorn and nohup
|
||||
nohup uvicorn run:app --host 0.0.0.0 --port 5251 > app.log 2>&1 &
|
||||
|
||||
echo "Application started on port 5251. Check app.log for output."
|
||||
echo "To stop the application, find the process ID with 'ps aux | grep uvicorn' and kill it with 'kill <PID>'."
|
||||
Reference in New Issue
Block a user