12 lines
443 B
Python
12 lines
443 B
Python
import os
|
|
|
|
class Config:
|
|
# Read values from environment variables or use defaults
|
|
FILE_DIRECTORY = os.environ.get("FILE_DIRECTORY", "/mnt/storage/files")
|
|
HOST = os.environ.get("HOST", "127.0.0.1")
|
|
PORT = int(os.environ.get("PORT", 5000))
|
|
DEBUG = os.environ.get("DEBUG", "False").lower() in ("true", "1")
|
|
|
|
# Ensure upload directory exists
|
|
if not os.path.exists(Config.FILE_DIRECTORY):
|
|
os.makedirs(Config.FILE_DIRECTORY)
|