chore: restructure project directory and update Dockerfile paths
Build and Push to Registry / build (push) Successful in 8s
Build and Push to Registry / build (push) Successful in 8s
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorDatabase
|
||||
|
||||
from core.config import settings
|
||||
|
||||
|
||||
class _MongoDB:
|
||||
client: AsyncIOMotorClient | None = None
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import redis.asyncio as aioredis
|
||||
|
||||
from core.config import settings
|
||||
|
||||
_redis_pool: aioredis.Redis | None = None
|
||||
@@ -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"
|
||||
@@ -1,6 +1,8 @@
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from models.service import ServiceDocument
|
||||
|
||||
|
||||
class ProxyDocument(BaseModel):
|
||||
port: int = Field(..., description="Port number of the proxy")
|
||||
service: ServiceDocument = Field(..., description="Associated service details")
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user