diff --git a/Dockerfile b/Dockerfile index 7f7feaa..0c8168d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ COPY pyproject.toml ./ RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir fastapi uvicorn -COPY src ./src +COPY app ./src EXPOSE 3671 diff --git a/README.md b/README.md index 5388c6f..f015e15 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ avvia i servizi e il server locale docker compose up -d mongodb redis ``` ```bash -fastapi dev src/main.py +fastapi dev app/main.py ``` accedi a FastAPI su: [FastAPI docs](http://localhost:3671/docs) diff --git a/src/__init__.py b/app/__init__.py similarity index 100% rename from src/__init__.py rename to app/__init__.py diff --git a/src/proxy/__init__.py b/app/api/__init__.py similarity index 100% rename from src/proxy/__init__.py rename to app/api/__init__.py diff --git a/src/utils/proxy/__init__.py b/app/api/proxy/__init__.py similarity index 100% rename from src/utils/proxy/__init__.py rename to app/api/proxy/__init__.py diff --git a/src/proxy/router.py b/app/api/proxy/router.py similarity index 100% rename from src/proxy/router.py rename to app/api/proxy/router.py diff --git a/src/main.py b/app/main.py similarity index 76% rename from src/main.py rename to app/main.py index 5399e74..5fdb9da 100644 --- a/src/main.py +++ b/app/main.py @@ -1,6 +1,6 @@ from fastapi import FastAPI -from src.proxy.router import router as proxy_router +from api.proxy import router as proxy_router app = FastAPI( title="thePlugAPI" diff --git a/app/utils/proxy/__init__.py b/app/utils/proxy/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/utils/proxy/manager.py b/app/utils/proxy/manager.py similarity index 67% rename from src/utils/proxy/manager.py rename to app/utils/proxy/manager.py index 21039e7..6434ac6 100644 --- a/src/utils/proxy/manager.py +++ b/app/utils/proxy/manager.py @@ -1,5 +1,3 @@ -from typing import Literal - from utils.proxy.types import ServiceConfig @@ -7,6 +5,6 @@ async def create_proxy( port: int, name: str, service: ServiceConfig, - proxy_type: Literal["easy", "manual"] + code: str ): return diff --git a/src/utils/proxy/types.py b/app/utils/proxy/types.py similarity index 100% rename from src/utils/proxy/types.py rename to app/utils/proxy/types.py