refactor: reorganize the whole project layout
Build and Push to Registry / build (push) Successful in 8s
Build and Push to Registry / build (push) Successful in 8s
Co-authored-by: gabdevele <[email protected]>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from core.security import require_authenticated_user
|
||||
from db.proxy import (
|
||||
create_proxy,
|
||||
delete_proxy,
|
||||
@@ -9,8 +8,10 @@ from db.proxy import (
|
||||
list_proxies as list_proxy_documents,
|
||||
)
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
|
||||
from core.security import require_authenticated_user
|
||||
from models.proxy import ProxyCreateInput, ProxyUpdateInput
|
||||
from utils.proxy.validator import ProxyCodeValidationError, validate_proxy_code
|
||||
from services.proxy.validator import ProxyCodeValidationError, validate_proxy_code
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/proxy",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from utils.docker.compose import (
|
||||
from integrations.docker.compose import (
|
||||
find_docker_compose,
|
||||
get_all_services,
|
||||
get_services,
|
||||
get_visible_folders,
|
||||
)
|
||||
from utils.docker.editor import change_port
|
||||
from utils.docker.models import DockerService
|
||||
from integrations.docker.editor import change_port
|
||||
from integrations.docker.models import DockerService
|
||||
|
||||
__all__ = [
|
||||
"DockerService",
|
||||
@@ -2,8 +2,8 @@ from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
from utils.docker.models import DockerService
|
||||
from utils.docker.ports import _get_service_port
|
||||
from integrations.docker.models import DockerService
|
||||
from integrations.docker.ports import _get_service_port
|
||||
|
||||
COMPOSE_NAMES = (
|
||||
"compose.yml",
|
||||
@@ -2,8 +2,8 @@ from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
from utils.docker.compose import find_docker_compose
|
||||
from utils.docker.ports import _get_port_index, _replace_port_in_mapping
|
||||
from integrations.docker.compose import find_docker_compose
|
||||
from integrations.docker.ports import _get_port_index, _replace_port_in_mapping
|
||||
|
||||
|
||||
def _backup_path_for(compose_path: Path) -> Path:
|
||||
@@ -2,9 +2,10 @@ from collections.abc import Mapping
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
from motor.motor_asyncio import AsyncIOMotorCollection
|
||||
|
||||
from core.mongodb import get_database
|
||||
from models.auth import AuthUserDocument
|
||||
from motor.motor_asyncio import AsyncIOMotorCollection
|
||||
|
||||
USERS_COLLECTION_NAME = "auth_users"
|
||||
REVOKED_COLLECTION_NAME = "revoked_tokens"
|
||||
@@ -2,12 +2,13 @@ from collections.abc import Mapping
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
from motor.motor_asyncio import AsyncIOMotorCollection
|
||||
from pymongo import ReturnDocument
|
||||
|
||||
from core.mongodb import get_database
|
||||
from models.proxy import ProxyDocument, ProxyUpdateInput
|
||||
from models.service import ServiceEndpointDocument
|
||||
from motor.motor_asyncio import AsyncIOMotorCollection
|
||||
from pymongo import ReturnDocument
|
||||
from utils.proxy.types import ServiceConfig
|
||||
from services.proxy.types import ServiceConfig
|
||||
|
||||
COLLECTION_NAME = "proxies"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from utils.proxy.types import ServiceConfig
|
||||
from services.proxy.types import ServiceConfig
|
||||
|
||||
|
||||
async def create_proxy(
|
||||
Reference in New Issue
Block a user