Initial commit
This commit is contained in:
commit
b22231c8b6
40 changed files with 2443 additions and 0 deletions
31
frontend/config.py
Normal file
31
frontend/config.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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")
|
||||
Loading…
Add table
Add a link
Reference in a new issue