Added gunicorn

This commit is contained in:
Sviatoslav Tsariov Yurievich 2025-07-01 10:44:42 +03:00
parent 8a20124859
commit 15aa7709e8
3 changed files with 11 additions and 8 deletions

View File

@ -12,4 +12,4 @@ 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", "app:create_app"]

3
app.py Normal file
View File

@ -0,0 +1,3 @@
from src.app import create_app
app = create_app()

View File

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