diff --git a/Dockerfile b/Dockerfile index 8a38469..aebbba6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/apiApp/config.py b/apiApp/config.py index 2767c1b..9f2baaa 100644 --- a/apiApp/config.py +++ b/apiApp/config.py @@ -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") diff --git a/autoLoader/config.py b/autoLoader/config.py index c9cb749..7122f43 100644 --- a/autoLoader/config.py +++ b/autoLoader/config.py @@ -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 diff --git a/requirements.txt b/requirements.txt index 49b4215..34206bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ pydantic==2.9.2 python-multipart==0.0.12 aiofiles==24.1.0 psycopg2-binary -paramiko \ No newline at end of file +paramiko +requests \ No newline at end of file diff --git a/run.py b/run.py index 23d9af4..db987fd 100644 --- a/run.py +++ b/run.py @@ -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" )