reinhard-brandstaedter / solarflow-statuspage

A simple statuspage with live-data from Zendure's Solarflow Hub for those who do not want to use the App
22 stars 6 forks source link

Online argument not recognized #44

Open floriandrott opened 3 months ago

floriandrott commented 3 months ago

I tried to use the ONLINE connecition and unfortunately the container is not picking up the argument. Every time it tries to use the LOCAL use case.

Following command is used: docker run --rm --env-file /tmp/conf.env -p 127.0.0.1:5011:5000 --name solarflow-statuspage rbrandstaedter/solarflow-statuspage:master --online

Output is

Unable to find image 'rbrandstaedter/solarflow-statuspage:master
locally master: Pulling from rbrandstaedter/solarflow-statuspage
579b34f0a95b: Pull complete 
470a5c3c55f5: Pull complete 
6a33a6f017af: Pull complete 
e2c3fdef3b5c: Pull complete 
ee4a832d112a: Pull complete 
1742608fc7fd: Pull complete 
f4f567df629e: Pull complete 
d04ce9950f2b: Pull complete 
1958863e63a7: Pull complete 
4078e61dfc20: Pull complete 
272ac057eb8d: Pull complete 
Digest: sha256:2dc996eeeb28c679183415fb8f606a39b73c7af2531fb674ae988eb91920c909
Status: Downloaded newer image for rbrandstaedter/solarflow-statuspage:master
2024-04-15 15:58:49,212:ERROR: No configuration file (config.ini) found in execution directory! Using environment variables.
2024-04-15 15:58:49,212:ERROR: You need a local MQTT broker (set environment variable MQTT_HOST)!

The content of the .env-file:

ZEN_MQTT='mqtt.zen-iot.com'
ZEN_USER=XXXX
ZEN_PASSWD=XXXX
ZEN_API='https://app.zendure.tech/'

Any ideas how to fix this?

tuxianerDE commented 2 months ago

Hey Florian,

can you try the following, can you jump on your host system to the /tmp directory and start the container again there? The env file is sometimes a bit tricky to handle.

I myself used a config.ini file with mapping. my compose skript looks like this (while I am in the offline mode that of course needs to be adjusted to your needs)

  solarFlowStatusPage:
    container_name: solarFlowStatusPage
    image: "rbrandstaedter/solarflow-statuspage:master"
    command: --offline
    volumes:
      - /data/config/solarFlowStatusPage/config.ini:/config.ini
    restart: unless-stopped
    privileged: true
    #    network_mode: host
    ports:
      - 5000:5000