- Initialisation of the EveAI Chat Client.
- Introduction of Tenant Makes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from gevent import monkey
|
||||
monkey.patch_all()
|
||||
|
||||
from eveai_chat import create_app
|
||||
from eveai_chat_client import create_app
|
||||
|
||||
app = create_app()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "/app/" || exit 1
|
||||
export PROJECT_DIR="/app"
|
||||
export PYTHONPATH="$PROJECT_DIR/patched_packages:$PYTHONPATH:$PROJECT_DIR" # Include the app directory in the Python path & patched packages
|
||||
|
||||
# Ensure we can write the logs
|
||||
chown -R appuser:appuser /app/logs
|
||||
|
||||
# Set flask environment variables
|
||||
#export FLASK_ENV=development # Use 'production' as appropriate
|
||||
#export FLASK_DEBUG=1 # Use 0 for production
|
||||
echo "Starting EveAI Chat"
|
||||
|
||||
# Start Flask app
|
||||
gunicorn -w 1 -k gevent -b 0.0.0.0:5002 --worker-connections 100 scripts.run_eveai_chat:app
|
||||
23
scripts/start_eveai_chat_client.sh
Executable file
23
scripts/start_eveai_chat_client.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd "/app" || exit 1
|
||||
export PYTHONPATH="$PYTHONPATH:/app/"
|
||||
|
||||
# Ensure we can write the logs
|
||||
chown -R appuser:appuser /app/logs
|
||||
|
||||
# Wait for the database to be ready
|
||||
echo "Waiting for database to be ready"
|
||||
until pg_isready -h $DB_HOST -p $DB_PORT; do
|
||||
echo "Postgres is unavailable - sleeping"
|
||||
sleep 2
|
||||
done
|
||||
echo "Postgres is up - executing commands"
|
||||
|
||||
# Set FLASK_APP environment variables
|
||||
PROJECT_DIR="/app"
|
||||
export FLASK_APP=${PROJECT_DIR}/scripts/run_eveai_chat_client.py
|
||||
export PYTHONPATH="$PROJECT_DIR/patched_packages:$PYTHONPATH:$PROJECT_DIR"
|
||||
|
||||
# Start Flask app with Gunicorn
|
||||
gunicorn -w 1 -k gevent -b 0.0.0.0:5004 --worker-connections 100 scripts.run_eveai_chat_client:app
|
||||
Reference in New Issue
Block a user