host_fix
This commit is contained in:
1
req.txt
1
req.txt
@@ -9,3 +9,4 @@ typing-extensions
|
|||||||
aiofiles
|
aiofiles
|
||||||
websockets
|
websockets
|
||||||
python-multipart
|
python-multipart
|
||||||
|
python-dotenv
|
||||||
@@ -20,6 +20,7 @@ from typing import Dict, List, Optional, Set, Tuple, Any
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from multiprocessing import Process, Manager, Queue, cpu_count, freeze_support
|
from multiprocessing import Process, Manager, Queue, cpu_count, freeze_support
|
||||||
from concurrent.futures import ProcessPoolExecutor
|
from concurrent.futures import ProcessPoolExecutor
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -33,9 +34,11 @@ from fastapi.templating import Jinja2Templates
|
|||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
|
load_dotenv()
|
||||||
|
|
||||||
# ========== КОНФИГУРАЦИЯ ==========
|
# ========== КОНФИГУРАЦИЯ ==========
|
||||||
SERVER_CONFIG = {
|
SERVER_CONFIG = {
|
||||||
"host": "0.0.0.0", # сюда IP смотрящий наружу или 0.0.0.0 для всех интерфейсов
|
"host": os.getenv("host", "0.0.0.0"), # сюда IP смотрящий наружу или 0.0.0.0 для всех интерфейсов
|
||||||
"port": 8000,
|
"port": 8000,
|
||||||
"debug": False,
|
"debug": False,
|
||||||
"max_clients_per_room": 50,
|
"max_clients_per_room": 50,
|
||||||
|
|||||||
Reference in New Issue
Block a user