Initial commit for deployment
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create a directory for the AI service logs
|
||||
mkdir -p logs
|
||||
|
||||
# Activate virtual environment
|
||||
source venv/bin/activate
|
||||
|
||||
# Export environment variables
|
||||
export API_HOST=0.0.0.0
|
||||
export API_PORT=5251
|
||||
|
||||
# Make sure the Python path includes the current directory
|
||||
export PYTHONPATH=$PYTHONPATH:$(pwd)
|
||||
|
||||
# Run the application with uvicorn and nohup
|
||||
nohup uvicorn ai_service.run:app --host $API_HOST --port $API_PORT > logs/ai_service.log 2>&1 &
|
||||
|
||||
echo "AI Service started on port $API_PORT. Check ai_service.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