Added gunicorn

This commit is contained in:
Sviatoslav Tsariov Yurievich 2025-07-01 10:42:14 +03:00
parent 72a6080830
commit 8a20124859
2 changed files with 9 additions and 7 deletions

View File

@ -10,4 +10,6 @@ RUN pip3 install gunicorn==21.2.0 gevent-websocket==0.10.1
COPY . . COPY . .
ENV PYTHONPATH="${PYTHONPATH}:/app"
CMD ["gunicorn", "-b", "0.0.0.0:5000", "-k", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "--workers", "1", "src.app:app"] CMD ["gunicorn", "-b", "0.0.0.0:5000", "-k", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "--workers", "1", "src.app:app"]

View File

@ -5,14 +5,14 @@ from werkzeug.serving import run_simple
from flask_cors import CORS from flask_cors import CORS
from pymongo import MongoClient from pymongo import MongoClient
from config import Config from .config import Config
from singletons.database_singleton import DatabaseSingleton from .singletons.database_singleton import DatabaseSingleton
from infra.server import app, socketio from .infra.server import app, socketio
from controllers.user_controller import user_blueprint from .controllers.user_controller import user_blueprint
from controllers.reservation_controller import reservation_blueprint from .controllers.reservation_controller import reservation_blueprint
from controllers.health_controller import health_blueprint from .controllers.health_controller import health_blueprint
from controllers.room_controller import room_blueprint from .controllers.room_controller import room_blueprint
CORS(app) CORS(app)
app.config['JWT_SECRET_KEY'] = Config.JWT_SECRET_KEY app.config['JWT_SECRET_KEY'] = Config.JWT_SECRET_KEY