- Full API application, streamlined, de-duplication of document handling code into document_utils.py

- Added meta-data fields to DocumentVersion
- Docker container to support API
This commit is contained in:
Josako
2024-09-09 16:11:42 +02:00
parent 341ba47d1c
commit 76cb825660
39 changed files with 598 additions and 6177 deletions

6
scripts/run_eveai_api.py Normal file
View File

@@ -0,0 +1,6 @@
from eveai_api import create_app
app = create_app()
if __name__ == '__main__':
app.run(debug=True)

15
scripts/start_eveai_api.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/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
# Set FLASK_APP environment variables
export FLASK_APP=${PROJECT_DIR}/scripts/run_eveai_app.py # Adjust the path to your Flask app entry point
# Ensure we can write the logs
chown -R appuser:appuser /app/logs
# Start Flask app
gunicorn -w 4 -k gevent -b 0.0.0.0:5003 scripts.run_eveai_api:app