feat: allow LARAVEL_STORAGE path to be configured via environment variable

This commit is contained in:
jouel88 2026-05-14 23:32:22 +07:00
parent 54b6216f2d
commit dc6ef1d984
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,10 @@ import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STORAGE_DIR = os.path.join(BASE_DIR, 'storage')
LARAVEL_STORAGE = os.path.join(BASE_DIR, '..', 'storage', 'app', 'private')
LARAVEL_STORAGE = os.environ.get(
'LARAVEL_STORAGE_PATH',
os.path.join(BASE_DIR, '..', 'storage', 'app', 'private')
)
DATASETS_DIR = os.path.join(LARAVEL_STORAGE, 'face_datasets')
MODELS_DIR = os.path.join(STORAGE_DIR, 'face_models')
TEMP_DIR = os.path.join(STORAGE_DIR, 'temp')