Compare commits
1 Commits
master
..
cfcc84eac9
| Author | SHA1 | Date | |
|---|---|---|---|
| cfcc84eac9 |
@@ -0,0 +1,17 @@
|
|||||||
|
# Database
|
||||||
|
# DATABASE_URL=sqlite:///./speech_analytics.db
|
||||||
|
# Для PostgreSQL:
|
||||||
|
DATABASE_URL=postgresql://postgres_test:test_user@postgres_test:5432/speech_analytics
|
||||||
|
|
||||||
|
# API Settings
|
||||||
|
API_V1_PREFIX=/api/v1
|
||||||
|
MAX_UPLOAD_SIZE=104857600 # 100MB in bytes
|
||||||
|
|
||||||
|
# Application
|
||||||
|
APP_TITLE=Speech Analytics API
|
||||||
|
APP_VERSION=1.0.0
|
||||||
|
|
||||||
|
# Server
|
||||||
|
HOST=0.0.0.0
|
||||||
|
PORT=5056
|
||||||
|
RELOAD=True
|
||||||
@@ -17,3 +17,6 @@ ALLOWED_AUDIO_EXTENSIONS = {".mp3", ".wav", ".ogg", ".flac", ".m4a", ".aac"}
|
|||||||
# Application
|
# Application
|
||||||
APP_TITLE = "Speech Analytics API"
|
APP_TITLE = "Speech Analytics API"
|
||||||
APP_VERSION = "1.0.0"
|
APP_VERSION = "1.0.0"
|
||||||
|
|
||||||
|
PORT = int(os.getenv("PORT", "8000"))
|
||||||
|
HOST = os.getenv("HOST", "localhost")
|
||||||
@@ -5,7 +5,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|||||||
from sqlalchemy.exc import SQLAlchemyError
|
from sqlalchemy.exc import SQLAlchemyError
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from apiApp.config import APP_TITLE, APP_VERSION, API_V1_PREFIX, UPLOAD_FOLDER, DATABASE_URL
|
from apiApp.config import APP_TITLE, APP_VERSION, API_V1_PREFIX, UPLOAD_FOLDER, DATABASE_URL, PORT, HOST
|
||||||
from apiApp.database import engine, Base
|
from apiApp.database import engine, Base
|
||||||
from apiApp.routers import audio_router, recognition_router
|
from apiApp.routers import audio_router, recognition_router
|
||||||
|
|
||||||
@@ -77,4 +77,4 @@ async def health_check():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import uvicorn
|
import uvicorn
|
||||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
uvicorn.run(app, host=HOST, port=PORT)
|
||||||
|
|||||||
Reference in New Issue
Block a user