Configure Docker to use Gunicorn instead of Flask development server for production deployment. Updated SocketIO configuration for gevent compatibility.

This commit is contained in:
2025-08-26 08:36:54 +00:00
parent eedaa253e4
commit 2fe272bd00
5 changed files with 28 additions and 6 deletions

View File

@@ -36,5 +36,5 @@ EXPOSE 5000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:5000/health', timeout=2)" || exit 1
# Run the application
CMD ["python", "run.py"]
# Run the application with Gunicorn using gevent workers for SocketIO compatibility
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--worker-class", "gevent", "--worker-connections", "1000", "--timeout", "30", "wsgi:app"]