31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
import os
|
|
from pathlib import Path
|
|
|
|
# URL du backend - configurée uniquement via variable d'environnement BACKEND_URL
|
|
# Pour le développement local : BACKEND_URL=http://localhost:8091
|
|
# Pour la production : BACKEND_URL=http://backend_entwine:8000
|
|
|
|
# URL Potree - configurée via variable d'environnement POTREE_URL
|
|
# Pour le développement local : POTREE_URL=http://localhost:8090
|
|
# Pour la production : POTREE_URL=http://potree_server:8090
|
|
|
|
def load_backend_config():
|
|
"""Charge la configuration du backend depuis les variables d'environnement."""
|
|
return os.getenv(
|
|
"BACKEND_URL", "http://localhost:8091"
|
|
).strip().rstrip("/")
|
|
|
|
def load_potree_config():
|
|
"""Charge la configuration Potree depuis les variables d'environnement."""
|
|
return os.getenv(
|
|
"POTREE_URL", "http://localhost:8090"
|
|
).strip().rstrip("/")
|
|
|
|
BACKEND_URL = load_backend_config()
|
|
POTREE_URL = load_potree_config()
|
|
|
|
SUPPORTED_FORMATS = [".las", ".laz", ".ply", ".xyz", ".pts"]
|
|
SUPPORTED_EXTENSIONS = SUPPORTED_FORMATS # Alias pour compatibilité
|
|
|
|
# Chemin du dossier EPT (nuages de points convertis)
|
|
EPT_DIR = Path("/app/backend/data/ept")
|