Files
ds_zagres_ai/deploy.sh
T
2025-05-09 15:41:16 +01:00

16 lines
476 B
Bash
Executable File

#!/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>'."