This commit is contained in:
parent
f5305c10d8
commit
30999a2cb2
11 changed files with 2486 additions and 0 deletions
28
clio-api/config.py
Normal file
28
clio-api/config.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Server configuration
|
||||
HOST = os.getenv("HOST", "0.0.0.0")
|
||||
PORT = int(os.getenv("PORT", "8000"))
|
||||
|
||||
# Storage configuration
|
||||
BASE_DIR = Path(os.getenv("BASE_DIR", os.path.dirname(os.path.abspath(__file__))))
|
||||
RECORDINGS_DIR = Path(os.getenv("RECORDINGS_DIR", str(BASE_DIR / "recordings")))
|
||||
KEYS_DIR = Path(os.getenv("KEYS_DIR", str(BASE_DIR / "keys")))
|
||||
|
||||
# Database
|
||||
DATABASE_PATH = Path(os.getenv("DATABASE_PATH", str(BASE_DIR / "recordings.db")))
|
||||
|
||||
# API Key for upload authentication (optional but recommended)
|
||||
API_KEY = os.getenv("API_KEY", "")
|
||||
|
||||
# Audio serving - can point to external drive or different location
|
||||
AUDIO_BASE_PATH = Path(os.getenv("AUDIO_BASE_PATH", str(RECORDINGS_DIR)))
|
||||
|
||||
# Key files
|
||||
PRIVATE_KEY_FILE = KEYS_DIR / "private.key"
|
||||
PUBLIC_KEY_FILE = KEYS_DIR / "public.key"
|
||||
|
||||
# Ensure directories exist
|
||||
RECORDINGS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
KEYS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue