diff --git a/Dockerfile b/Dockerfile index ed6598c..97f0865 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,14 @@ WORKDIR /code COPY . . RUN pip3 install . +ENV IMMICH_API_TOKEN="" +ENV IMMICH_HOST="" +ENV IMMICH_PORT="" ENV QBITTORRENT_HOST="" ENV QBITTORRENT_PORT="" ENV QBITTORRENT_USER="" ENV QBITTORRENT_PASS="" +#has to be EXPORT_PORT 8000 or else it does not work, same applies to the env file ENV EXPORTER_PORT="8000" ENV EXPORTER_LOG_LEVEL="INFO" diff --git a/qbittorrent_exporter/exporter.py b/qbittorrent_exporter/exporter.py index 16d2da6..8a7328e 100644 --- a/qbittorrent_exporter/exporter.py +++ b/qbittorrent_exporter/exporter.py @@ -192,13 +192,16 @@ def main(): logger.setLevel("INFO") # default until config is loaded config = { + "immich_host": get_config_value("IMMICH_HOST",""), + "immich_port": get_config_value("IMMICH_PORT",""), + "token": get_config_value("IMMICH_API_TOKEN", ""), "host": get_config_value("QBITTORRENT_HOST", ""), "port": get_config_value("QBITTORRENT_PORT", ""), "username": get_config_value("QBITTORRENT_USER", ""), "password": get_config_value("QBITTORRENT_PASS", ""), "exporter_port": int(get_config_value("EXPORTER_PORT", "8000")), "log_level": get_config_value("EXPORTER_LOG_LEVEL", "INFO"), - "metrics_prefix": get_config_value("METRICS_PREFIX", "qbittorrent"), + "metrics_prefix": get_config_value("METRICS_PREFIX", "immich"), } # set level once config has been loaded logger.setLevel(config["log_level"])