fix settings
This commit is contained in:
+3
-2
@@ -32,7 +32,8 @@ RUN mkdir -p /app/uploads
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
# Открытие порта
|
||||
EXPOSE 8000
|
||||
EXPOSE 5008
|
||||
|
||||
# Команда запуска приложения
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
CMD ["python", "run.py"]
|
||||
+5
-3
@@ -21,16 +21,18 @@ ALLOWED_AUDIO_EXTENSIONS = {".mp3", ".wav", ".ogg", ".flac", ".m4a", ".aac"}
|
||||
APP_TITLE = "Speech Analytics API"
|
||||
APP_VERSION = "1.0.0"
|
||||
|
||||
PORT = int(os.getenv("PORT", "8000"))
|
||||
PORT = int(os.getenv("PORT", "5008"))
|
||||
HOST = os.getenv("HOST", "localhost")
|
||||
|
||||
# GigaAM API Configuration
|
||||
GIGAAM_API_URL = os.getenv("GIGAAM_API_URL", "http://gigaam_api:5001")
|
||||
GIGAAM_API_URL = os.getenv("GIGAAM_API_URL", "http://192.168.1.73:5002")
|
||||
|
||||
AUDIOFILES_PATH = os.path.join(os.getcwd(), os.getenv("FILESAPTH", "audiofiles"))
|
||||
|
||||
# Calls_WEB_Client_main Webhook Configuration
|
||||
CALLS_WEB_CLIENT_URL = os.getenv(
|
||||
"CALLS_WEB_CLIENT_URL",
|
||||
"http://calls_web_client:8000"
|
||||
"http://192.168.1.73:5059"
|
||||
)
|
||||
WEBHOOK_ENDPOINT = f"{CALLS_WEB_CLIENT_URL}/api/transcription/webhook"
|
||||
WEBHOOK_API_KEY = os.getenv("WEBHOOK_API_KEY", "webhook_secret_key")
|
||||
|
||||
@@ -11,3 +11,6 @@ DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///./speech_analytics.db")
|
||||
|
||||
# GigaAM API
|
||||
GIGAAM_API_URL = os.getenv("GIGAAM_API_URL", "http://localhost:5001")
|
||||
|
||||
#App Setting
|
||||
PORT = 5008
|
||||
|
||||
+2
-1
@@ -5,4 +5,5 @@ pydantic==2.9.2
|
||||
python-multipart==0.0.12
|
||||
aiofiles==24.1.0
|
||||
psycopg2-binary
|
||||
paramiko
|
||||
paramiko
|
||||
requests
|
||||
@@ -5,6 +5,7 @@
|
||||
import uvicorn
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from apiApp.config import PORT
|
||||
|
||||
# >102;O5< :>@=52CN 48@5:B>@8N 2 Python path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
@@ -13,7 +14,7 @@ if __name__ == "__main__":
|
||||
uvicorn.run(
|
||||
"main:app",
|
||||
host="0.0.0.0",
|
||||
port=8000,
|
||||
port=PORT,
|
||||
reload=True, # 2B><0B8G5A:0O ?5@5703@C7:0 ?@8 87<5=5=88 :>40
|
||||
log_level="info"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user