immich env vars added
This commit is contained in:
parent
fb12d50373
commit
da143b6219
2 changed files with 8 additions and 1 deletions
|
@ -9,10 +9,14 @@ WORKDIR /code
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pip3 install .
|
RUN pip3 install .
|
||||||
|
|
||||||
|
ENV IMMICH_API_TOKEN=""
|
||||||
|
ENV IMMICH_HOST=""
|
||||||
|
ENV IMMICH_PORT=""
|
||||||
ENV QBITTORRENT_HOST=""
|
ENV QBITTORRENT_HOST=""
|
||||||
ENV QBITTORRENT_PORT=""
|
ENV QBITTORRENT_PORT=""
|
||||||
ENV QBITTORRENT_USER=""
|
ENV QBITTORRENT_USER=""
|
||||||
ENV QBITTORRENT_PASS=""
|
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_PORT="8000"
|
||||||
ENV EXPORTER_LOG_LEVEL="INFO"
|
ENV EXPORTER_LOG_LEVEL="INFO"
|
||||||
|
|
||||||
|
|
|
@ -192,13 +192,16 @@ def main():
|
||||||
logger.setLevel("INFO") # default until config is loaded
|
logger.setLevel("INFO") # default until config is loaded
|
||||||
|
|
||||||
config = {
|
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", ""),
|
"host": get_config_value("QBITTORRENT_HOST", ""),
|
||||||
"port": get_config_value("QBITTORRENT_PORT", ""),
|
"port": get_config_value("QBITTORRENT_PORT", ""),
|
||||||
"username": get_config_value("QBITTORRENT_USER", ""),
|
"username": get_config_value("QBITTORRENT_USER", ""),
|
||||||
"password": get_config_value("QBITTORRENT_PASS", ""),
|
"password": get_config_value("QBITTORRENT_PASS", ""),
|
||||||
"exporter_port": int(get_config_value("EXPORTER_PORT", "8000")),
|
"exporter_port": int(get_config_value("EXPORTER_PORT", "8000")),
|
||||||
"log_level": get_config_value("EXPORTER_LOG_LEVEL", "INFO"),
|
"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
|
# set level once config has been loaded
|
||||||
logger.setLevel(config["log_level"])
|
logger.setLevel(config["log_level"])
|
||||||
|
|
Loading…
Reference in a new issue