Spaces:
Runtime error
Runtime error
feat(docker):can be deployed
Browse files- app/app.py → app.py +1 -1
- local.md +3 -1
- {app → src}/controllers/__init__.py +0 -0
- {app → src}/controllers/organisation_controller.py +0 -0
- {app → src}/controllers/user_controller.py +0 -0
- {app → src}/routes/__init__.py +0 -0
- {app → src}/routes/organisation_routes.py +1 -1
- {app → src}/routes/user_routes.py +1 -1
app/app.py → app.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
-
from routes import user_routes, organisation_routes
|
| 3 |
|
| 4 |
app = FastAPI(title="NetSentinel Backend")
|
| 5 |
|
|
|
|
| 1 |
from fastapi import FastAPI
|
| 2 |
+
from src.routes import user_routes, organisation_routes
|
| 3 |
|
| 4 |
app = FastAPI(title="NetSentinel Backend")
|
| 5 |
|
local.md
CHANGED
|
@@ -2,7 +2,9 @@ docker build -t netsentinel .
|
|
| 2 |
docker run -p 7860:7860 netsentinel
|
| 3 |
|
| 4 |
// en temps reel
|
| 5 |
-
docker run -p 7860:7860 -v ${PWD}:/app netsentinel
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Créer un venv
|
| 8 |
python -m venv venv
|
|
|
|
| 2 |
docker run -p 7860:7860 netsentinel
|
| 3 |
|
| 4 |
// en temps reel
|
| 5 |
+
docker run -p 7860:7860 -v ${PWD}:/app -it netsentinel bash
|
| 6 |
+
user@1a8df249832e:/app$ export PYTHONPATH=/app/app:$PYTHONPATH
|
| 7 |
+
uvicorn app:app --host 0.0.0.0 --reload
|
| 8 |
|
| 9 |
# Créer un venv
|
| 10 |
python -m venv venv
|
{app → src}/controllers/__init__.py
RENAMED
|
File without changes
|
{app → src}/controllers/organisation_controller.py
RENAMED
|
File without changes
|
{app → src}/controllers/user_controller.py
RENAMED
|
File without changes
|
{app → src}/routes/__init__.py
RENAMED
|
File without changes
|
{app → src}/routes/organisation_routes.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from fastapi import APIRouter
|
| 2 |
-
from controllers import organisation_controller
|
| 3 |
|
| 4 |
router = APIRouter(prefix="/organisations", tags=["Organisations"])
|
| 5 |
|
|
|
|
| 1 |
from fastapi import APIRouter
|
| 2 |
+
from src.controllers import organisation_controller
|
| 3 |
|
| 4 |
router = APIRouter(prefix="/organisations", tags=["Organisations"])
|
| 5 |
|
{app → src}/routes/user_routes.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from fastapi import APIRouter
|
| 2 |
-
from controllers import user_controller
|
| 3 |
|
| 4 |
router = APIRouter(prefix="/users", tags=["Users"])
|
| 5 |
|
|
|
|
| 1 |
from fastapi import APIRouter
|
| 2 |
+
from src.controllers import user_controller
|
| 3 |
|
| 4 |
router = APIRouter(prefix="/users", tags=["Users"])
|
| 5 |
|