added some dotenv stuff
This commit is contained in:
@@ -12,4 +12,4 @@ authors = [
|
||||
license = { file = "LICENSE" }
|
||||
requires-python = ">=3.10"
|
||||
|
||||
dependencies = ["rich", "requests", "click", "docker"]
|
||||
dependencies = ["rich", "requests", "click", "docker", "python-dotenv"]
|
||||
|
||||
@@ -4,3 +4,4 @@ rich
|
||||
requests
|
||||
click
|
||||
docker
|
||||
python-dotenv
|
||||
@@ -81,6 +81,7 @@ def main(
|
||||
logging.getLogger('urllib3.connectionpool').setLevel('WARNING')
|
||||
|
||||
if project is not None and services is not None:
|
||||
logger.debug(f'Using project {project} and stopping services: {services}')
|
||||
decorator = manage_containers(project=project, services=services.split(','))
|
||||
func = decorator(run)
|
||||
else:
|
||||
@@ -96,4 +97,10 @@ def main(
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from dotenv import load_dotenv
|
||||
from pathlib import Path
|
||||
|
||||
dotenv_file = Path.cwd() / '.env'
|
||||
print(dotenv_file)
|
||||
load_dotenv(dotenv_path=dotenv_file)
|
||||
main()
|
||||
|
||||
@@ -35,4 +35,7 @@ def main(loki_url: str = None):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user