implemented docker

This commit is contained in:
2023-06-05 18:05:17 -05:00
parent 5c5beddaae
commit 5e468fdf2b
5 changed files with 195 additions and 1 deletions

View File

@@ -8,14 +8,22 @@ import datetime
import logging
import requests
from tomllib import load
import os
class Crn:
def __init__(self):
"""Main object, should be calling functions from qlist.py, qlogging.py and qprocess.py"""
# Open the config. Needs a json file with the data in config.json.example
self.st = datetime.datetime.now()
with open('./config.toml', 'rb') as c:
config_file_path=os.environ["toml_path"]
with open(config_file_path, 'rb') as c:
self.config = load(c)
if os.path.exists('./config.toml'):
config_file_path = './config.toml'
with open(config_file_path, 'rb') as c:
self.config = load(c)
# Create the api object
self.cc = requests
# Create the logging and pushover objects