diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..7da1f96 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 100 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..593af56 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM fedora +MAINTAINER https://github.com/SatelliteQE + +RUN dnf -y install git python3-pip python3-devel && dnf clean all +WORKDIR /root/manifester +ENV MANIFESTER_DIRECTORY=/root/manifester/ +COPY . /root/manifester/ +RUN pip install . +RUN cp manifester_settings.yaml.example manifester_settings.yaml + + +ENTRYPOINT ["manifester"] +CMD ["--help"] diff --git a/manifester/logger.py b/manifester/logger.py index d68dd9c..1d53692 100644 --- a/manifester/logger.py +++ b/manifester/logger.py @@ -4,6 +4,7 @@ from manifester.settings import settings + def setup_logzero(level="info", path="logs/manifester.log", silent=True): log_fmt = "%(color)s[%(levelname)s %(asctime)s]%(end_color)s %(message)s" debug_fmt = ( @@ -25,4 +26,5 @@ def setup_logzero(level="info", path="logs/manifester.log", silent=True): path, loglevel=log_level, maxBytes=1e9, backupCount=3, formatter=formatter ) -setup_logzero(level=settings.log_level) \ No newline at end of file + +setup_logzero(level=settings.get("log_level", "info")) diff --git a/manifester/settings.py b/manifester/settings.py index f72c41e..f5aeee9 100644 --- a/manifester/settings.py +++ b/manifester/settings.py @@ -2,6 +2,7 @@ from pathlib import Path from dynaconf import Dynaconf +from dynaconf import Validator settings_file = "manifester_settings.yaml" MANIFESTER_DIRECTORY = Path()