Ryandev / NetStatus

Internet speed & offline status monitor. Upload, download, ping, latency dashboard display
http://netstatus.ryanpowell.dev
MIT License
99 stars 7 forks source link

Unable to configure docker container #7

Closed FirbyKirby closed 3 years ago

FirbyKirby commented 3 years ago

I'm attempting to make some configuration changes to the NetStatus dashboard as per the Docker Configurables section of the readme. I'm not very skilled, so I may be misunderstanding the process here, but I believe these configurable arguments are changing environment variables in the container, correct? If so, I believe I've properly set them. See the output of printenv command when I SSH into the container:

/ # printenv
BALENA_DEVICE_TYPE=raspberry-pi2
RESIN_SUPERVISOR_VERSION=10.8.0
USER=root
REACT_APP_DOWNLOADWARN=8
BALENA_APP_ID=1822130
HOSTNAME=21abf5135d01
SHLVL=2
REACT_APP_PINGINTERVAL=15
HOME=/root
REACT_APP_DOWNLOADERROR=1
PKG_RELEASE=2
REACT_APP_LATENCYWARN=100
BALENA_APP_LOCK_PATH=/tmp/balena/updates.lock
RESIN_HOST_OS_VERSION=balenaOS 2.48.0+rev1
REACT_APP_UPLOADWARN=4
REACT_APP_LATENCYERROR=200
BALENA_SUPERVISOR_VERSION=10.8.0
RESIN_SERVICE_NAME=netspeed
REACT_APP_UPLOADERROR=1
RESIN_DEVICE_UUID=<redacted>
TERM=xterm
RESIN_DEVICE_NAME_AT_INIT=Speedy
NGINX_VERSION=1.18.0
RESIN=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
BALENA_HOST_OS_VERSION=balenaOS 2.48.0+rev1
RESIN_APP_NAME=NetStatus
NJS_VERSION=0.4.4
REACT_APP_TESTINTERVAL=300
BALENA_SERVICE_HANDOVER_COMPLETE_PATH=/tmp/balena/handover-complete
REACT_APP_JITTERWARN=50
BALENA_SERVICE_NAME=netspeed
RESIN_DEVICE_TYPE=raspberry-pi2
REACT_APP_JITTERERROR=100
BALENA_DEVICE_UUID=1269b119d9769731474413edb85323ab
BALENA_DEVICE_NAME_AT_INIT=Speedy
RESIN_APP_ID=1822130
BALENA=1
PWD=/
BALENA_APP_NAME=NetStatus
RESIN_APP_LOCK_PATH=/tmp/balena/updates.lock
RESIN_SERVICE_KILL_ME_PATH=/tmp/balena/handover-complete
/ # 

As you can tell from the mess of variables, I'm using Balena to deploy the project, which seems to be working quite well. I've used their web-based deployment dashboard to define (almost) all of your docker configurables so I could make tweaks at will, but as you can tell, I've only adjusted two of them away from the default values at this time (REACT_APP_LATENCYWARN and REACT_APP_LATENCYERROR.) However, no matter how I tweak these variables, the warning and error points seem to remain at the default value of 40ms (warn) and 100ms (error.) Here's a screenshot of the dashboard output after the container was restarted with these variables set to 100ms (warn) and 200ms (error.)

image

Am I missing something obvious?

For further background, I'm deploying to an old Rasberry Pi 2B (version 1.1) I had laying around, and I'm using a new 3.5" LCD I recently purchased from Amazon. Both are working extremely well with your code, and the Balena deployment solution. I'm just struggling with a little bit of configuration here at the end.

Ryandev commented 3 years ago

Ok, I haven't been completely absent. As I suspect like yourself, other commitments in life get in the way.

However, this is/was an issue. The args were only accepted at build time. On the latest branch:develop commit, I've added a script to load the docker env variables into the static nginx page.

Testing within docker & it looks fine. However when testing with 'local mode' on Balena I'm unable see my development version running, but the latest production version.

I've posted here: https://forums.balena.io/t/local-mode-testing-changes/311296

As soon as I can verify it behaves as expected, I'll merge develop into master & close this

FirbyKirby commented 3 years ago

Thanks for reaching back out on this. I'm just glad to hear I'm not making a terribly silly mistake since this is all pretty new to me (Balena specifically.) And you are absolutely correct. Life gets in the way. I get that. You've seen that I'm similarly "delayed" in response. So don't worry about it. Hopefully, my investigation of your project is useful and refreshing.

Your NetStatus project has been a fun side project for me. I think it's fairly well executed and well suited to a need I have. Frankly, I've enjoyed tinkering around with your typescript code. It's definitely not my specialty, so I'm using it as a vehicle to learn more about the language and its usage, so I'm in no hurry. And I wouldn't dream of rushing you either.

I look forward to the eventual merge of this functionality. Let me know if you need any testing or other contribution to help the process.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.