From f502c08d42ee62923d24628aded90fe5e129768a Mon Sep 17 00:00:00 2001 From: tebarius Date: Sun, 24 Nov 2024 16:11:02 +0100 Subject: [PATCH] v.0.1.0 --- README.md | 34 ++++++++++++++++++++++++++++++++++ app/netdata_DocRudi.py | 1 - app/requirements.txt | 10 ---------- docker-compose-build.yml | 15 +++++++++++++++ docker-compose.yml | 6 ++---- 5 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 docker-compose-build.yml diff --git a/README.md b/README.md index 67e7e1f..865efd2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,36 @@ # netdata-DocRudi +## build +to build container from source: +1. clone repository +2. change `NETDATA_HOST: http://my-netdata-ip:19999` in docker-compose-build.yml +3. run `sudo docker compose -f docker-compose-build.yml build` + +## run +### via docker run .. +`docker run -e NETDATA_HOST=http://url-of-your-netdata:19999 -p 19998:19998 gitea.tebarius.duckdns.org/tebarius/doc_rudi:latest` + +### via docker compose ... +compose-file: (!!! change NETDATA_HOST to your Netdata-Address) +``` +services: + doc_rudi: + image: gitea.tebarius.duckdns.org/tebarius/doc_rudi:latest + container_name: doc_rudi + restart: unless-stopped + ports: + - "19998:19998" + environment: + NETDATA_HOST: http://my-netdata-ip:19999 # default: http://localhost:19999 + #NETDATA_QUERY_SECONDS: 200000 # default: 200000 (last how many seconds to get from netdata) + #NETDATA_QUERY_POINTS: 3000 # default: 3000 (how many points in a row for the query) + #SITE_REFRESH: 0 # default: 0 (seconds to refresh the dashboard-website, 0 = no refresh) + #SERVER_PORT: 19998 # default: 19998 (internal Port of Server) +``` + +## Environment-Variables +- __NETDATA_HOST: http://my-netdata-ip:19999__ _- default: http://localhost:19999_ +- __NETDATA_QUERY_SECONDS: 200000__ _- default: 200000 (last how many seconds to get from netdata)_ +- __NETDATA_QUERY_POINTS: 3000__ _- default: 3000 (how many points in a row for the query)_ +- __SITE_REFRESH: 0__ _- default: 0 (seconds to refresh the dashboard-website, 0 = no refresh)_ +- __SERVER_PORT: 19998__ _- default: 19998 (internal Port of Server)_ diff --git a/app/netdata_DocRudi.py b/app/netdata_DocRudi.py index 692455f..814b3a4 100755 --- a/app/netdata_DocRudi.py +++ b/app/netdata_DocRudi.py @@ -17,7 +17,6 @@ netdata_host = os.environ.get('NETDATA_HOST', 'http://localhost:19999') netdata_query_seconds = int(os.environ.get('NETDATA_QUERY_SECONDS', '200000')) netdata_query_points = int(os.environ.get('NETDATA_QUERY_POINTS', '3000')) -print(type(netdata_query_points), file=sys.stderr) site_refresh = int(os.environ.get('SITE_REFRESH', '0')) server_host = socket.gethostname() diff --git a/app/requirements.txt b/app/requirements.txt index 550599c..62defdd 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -1,13 +1,3 @@ -blinker==1.9.0 -click==8.1.7 -colorama==0.4.6 Flask==3.1.0 -itsdangerous==2.2.0 -Jinja2==3.1.4 -MarkupSafe==3.0.2 -packaging==24.2 plotly==5.24.1 -tenacity==9.0.0 -Werkzeug==3.1.3 - waitress~=3.0.2 \ No newline at end of file diff --git a/docker-compose-build.yml b/docker-compose-build.yml new file mode 100644 index 0000000..4d1c679 --- /dev/null +++ b/docker-compose-build.yml @@ -0,0 +1,15 @@ +services: + doc_rudi: + build: + context: . + dockerfile: Dockerfile + container_name: doc_rudi + restart: unless-stopped + ports: + - "19998:19998" + #environment: + #NETDATA_HOST: http://my-netdata-ip:19999 # default: http://localhost:19999 + #NETDATA_QUERY_SECONDS: 200000 # default: 200000 (last how many seconds to get from netdata) + #NETDATA_QUERY_POINTS: 3000 # default: 3000 (how many points in a row for the query) + #SITE_REFRESH: 0 # default: 0 (seconds to refresh the dashboard-website, 0 = no refresh) + #SERVER_PORT: 19998 # default: 19998 (internal Port of Server) diff --git a/docker-compose.yml b/docker-compose.yml index 8292093..fb8ad31 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,10 @@ services: doc_rudi: - build: - context: . - dockerfile: Dockerfile + image: gitea.tebarius.duckdns.org/tebarius/doc_rudi:latest container_name: doc_rudi restart: unless-stopped ports: - - "19997:19997" + - "19998:19998" environment: NETDATA_HOST: http://my-netdata-ip:19999 # default: http://localhost:19999 #NETDATA_QUERY_SECONDS: 200000 # default: 200000 (last how many seconds to get from netdata)