isp-maintenance/scripts/devtools/cli/settings.py

19 lines
463 B
Python
Raw Normal View History

2024-06-04 23:35:21 +08:00
import pathlib
from environs import Env
# Path:
ROOT_DIR = pathlib.Path(__file__).resolve().parent.parent.parent.parent
PROJECT_DIR = ROOT_DIR / 'mgrctl'
COMPOSE_FILE = ROOT_DIR / 'docker-compose.yml'
# Init environment:
env = Env()
# read .env file, if it exists
# reed more about .env file here: https://github.com/sloria/environs
env.read_env(path=ROOT_DIR / '.env')
# ! insecure save sudo password wherever
SUDO_PASSWORD = env.str('SUDO_PASSWORD', None)