diff --git a/Dockerfile b/Dockerfile index ed91d61..daffbcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +CMD ["gunicorn", "-b", "0.0.0.0:5000", "-k", "geventwebsocket.gunicorn.workers.GeventWebSocketWorker", "--workers", "1", "app:create_app"] \ No newline at end of file diff --git a/app.py b/app.py new file mode 100644 index 0000000..624de80 --- /dev/null +++ b/app.py @@ -0,0 +1,3 @@ +from src.app import create_app + +app = create_app() \ No newline at end of file diff --git a/src/app.py b/src/app.py index 2779a9d..0752521 100644 --- a/src/app.py +++ b/src/app.py @@ -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