From 51ae81c98f838a92f26dde4a95f75f2358026c77 Mon Sep 17 00:00:00 2001 From: andrei Date: Sat, 21 Dec 2024 11:22:14 +0500 Subject: [PATCH] ._. --- app/Dockerfile | 2 ++ app/main.py | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index c1913c5..23f248c 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -12,4 +12,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . +WORKDIR / + CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8062"] \ No newline at end of file diff --git a/app/main.py b/app/main.py index e8752d3..c4f7409 100644 --- a/app/main.py +++ b/app/main.py @@ -4,17 +4,17 @@ import logging from starlette.middleware.cors import CORSMiddleware -from infrastructure.database.database import init_db -from infrastructure.fastapi.accessory_routes import router as accessory_router -from infrastructure.fastapi.city_routes import router as city_router -from infrastructure.fastapi.delivery_accessory_routes import router as delivery_accessory_router -from infrastructure.fastapi.delivery_order_routes import router as delivery_order_router -from infrastructure.fastapi.federal_district_routes import router as federal_district_router -from infrastructure.fastapi.role_routes import router as role_router -from infrastructure.fastapi.status_routes import router as status_router -from infrastructure.fastapi.total_order_routes import router as total_order_router -from infrastructure.fastapi.truck_routes import router as truck_router -from infrastructure.fastapi.user_routes import router as user_router +from app.infrastructure.database.database import init_db +from app.infrastructure.fastapi.accessory_routes import router as accessory_router +from app.infrastructure.fastapi.city_routes import router as city_router +from app.infrastructure.fastapi.delivery_accessory_routes import router as delivery_accessory_router +from app.infrastructure.fastapi.delivery_order_routes import router as delivery_order_router +from app.infrastructure.fastapi.federal_district_routes import router as federal_district_router +from app.infrastructure.fastapi.role_routes import router as role_router +from app.infrastructure.fastapi.status_routes import router as status_router +from app.infrastructure.fastapi.total_order_routes import router as total_order_router +from app.infrastructure.fastapi.truck_routes import router as truck_router +from app.infrastructure.fastapi.user_routes import router as user_router logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__)