Compare commits

...

14 Commits

Author SHA1 Message Date
Shane Daley dfb7d8824d Tidy up repo and prepare data structure 2024-02-27 23:34:30 +00:00
M0VUB f67a4213ef
Update config_SAMPLE.py
prep for new clean up
2024-02-27 23:20:59 +00:00
M0VUB 0ea915e43f
Update README.md
Versioning
2024-02-27 00:26:01 +00:00
M0VUB c718d47c6c
Update Dockerfile
Versioning
2024-02-27 00:20:34 +00:00
M0VUB 59a5d1dfc7
Update monitor.py
Add versioning for release
2024-02-27 00:19:45 +00:00
M0VUB 6ecfaa0e81
Update image.yml
main branch build
2024-02-26 20:43:35 +00:00
Shane Daley 1c0c912d58 Start the workflow 2024-02-26 20:40:35 +00:00
Shane Daley dc212da420 revert the workflow until we find out why its not building 2024-02-26 20:38:05 +00:00
Shane Daley 7b7dc15837 Build 2024-02-26 20:33:08 +00:00
Shane Daley 257f50080f remove the build 2024-02-26 20:30:47 +00:00
M0VUB edaa5b6c9d
Update monitor.py 2024-02-26 20:23:03 +00:00
Shane Daley 163cd5cdbf Build the image 2024-02-26 20:19:58 +00:00
Shane Daley 4234de0aa0 update dockerfile and requirements 2024-02-26 20:13:46 +00:00
Shane Daley fbedd25e73 add github 2024-02-26 19:53:35 +00:00
13 changed files with 109 additions and 22 deletions

24
.github/workflows/image.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Build-HBMonv2
on:
push:
branches: main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: install buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
run: |
docker buildx build --push \
--tag shaymez/hbmonv2:latest \
--platform linux/i386,linux/amd64,linux/arm64 .

View File

@ -1,19 +1,37 @@
FROM python:alpine3.18
###############################################################################
# Copyright (C) 2024 Shane aka, ShaYmez <support@gb7nr.co.uk>
# Version 2.0.1
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
###############################################################################
COPY entrypoint-proxy /entrypoint
FROM python:alpine3.17
RUN adduser -D -u 54001 hbmon && \
apk update && \
apk add git gcc musl-dev libffi-dev libssl-dev cargo && \
pip install --upgrade pip && \
pip cache purge && \
cd /opt && \
git clone https://github.com/ShaYmez/HBMonv2.git && \
cd /opt/HBmonv2 && \
pip install --no-cache-dir -r requirements.txt && \
apk del git gcc musl-dev && \
chown -R radio: /opt/HBMonv2
COPY entrypoint /entrypoint
USER hbmon
RUN adduser -D -u 54000 radio
RUN apk update && \
apk add git gcc musl-dev libffi-dev openssl-dev cargo && \
pip install --upgrade pip && \
pip cache purge && \
git clone https://github.com/shaymez/HBMonv2.git /hbmon && \
cd /hbmon && \
pip install --no-cache-dir -r requirements.txt && \
apk del git gcc musl-dev && \
chown -R radio /hbmon
USER radio
ENTRYPOINT [ "/entrypoint" ]

View File

@ -1,11 +1,12 @@
**HBmonitor is a "web dashboard" for HBlink by N0MJS.**
**HBmonitor is a "web dashboard" for HBlink by N0MJS. Further developed by Steve KC1AWV**
***This is version of HBMonitor V2 by SP2ONG 2019-2022***
***Version - HBMonV2 by SP2ONG 2019-2022***
***Docker Version 2.0.1 by ShaYmez M0VUB 2020-2024***
The main difference between HBMonitor v1 and v2 is the layout, i.e. the main page shows condensed
information and on the subpages, you can see the individual content that was shown on v1
I recommend not running HBmonitor on the same computer as HBlink3
Recommend not running HBmonitor on the same computer as HBlink3
HBMonv2 is tested on Debian v9 v10 & v11

View File

@ -15,7 +15,7 @@ CLIENT_TIMEOUT = 0 # Clients are timed out after t
OPB_FILTER = ""
# Files and stuff for loading alias files for mapping numbers to names
PATH = './' # MUST END IN '/'
PATH = './data/' # MUST END IN '/'
PEER_FILE = 'peer_ids.json' # Will auto-download
SUBSCRIBER_FILE = 'subscriber_ids.json' # Will auto-download
TGID_FILE = 'talkgroup_ids.json' # User provided

View File

@ -1,2 +1,5 @@
cd /opt/HBMonv2
python /opt/HBMonv2/monitor.py
#!/bin/sh
echo 'Starting HBMonv2...'
cd /hbmon
python /hbmon/monitor.py

33
hbmon-config.py Normal file
View File

@ -0,0 +1,33 @@
##### Version 2.0.1 #####
##### DOCKER CONFIG ONLY USE THIS WHEN USING A DOCKERIZED ENVIROMENT #####
CONFIG_INC = True # Include HBlink stats
HOMEBREW_INC = True # Display Homebrew Peers status
LASTHEARD_INC = True # Display lastheard table on main page
BRIDGES_INC = False # Display Bridge status and button
EMPTY_MASTERS = False # Display Enable (True) or DISABLE (False) empty masters in status
#
HBLINK_IP = '172.16.238.10' # HBlink's IP Address (Normally 127.0.0.1)
HBLINK_PORT = 4321 # HBlink's TCP reporting socket
FREQUENCY = 10 # Frequency to push updates to web clients
CLIENT_TIMEOUT = 0 # Clients are timed out after this many seconds, 0 to disable
# Generally you don't need to use this but
# if you don't want to show in lastherad received traffic from OBP link put NETWORK ID
# for example: "260210,260211,260212"
OPB_FILTER = ""
# Files and stuff for loading alias files for mapping numbers to names
PATH = './data/' # MUST END IN '/'
PEER_FILE = 'peer_ids.json' # Will auto-download
SUBSCRIBER_FILE = 'subscriber_ids.json' # Will auto-download
TGID_FILE = 'talkgroup_ids.json' # User provided
LOCAL_SUB_FILE = 'local_subscriber_ids.json' # User provided (optional, leave '' if you don't use it)
LOCAL_PEER_FILE = 'local_peer_ids.json' # User provided (optional, leave '' if you don't use it)
LOCAL_TGID_FILE = 'local_talkgroup_ids.json' # User provided (optional, leave '' if you don't use it)
FILE_RELOAD = 28 # Number of days before we reload RadioID.net database files
PEER_URL = 'https://radioid.net/static/rptrs.json'
SUBSCRIBER_URL = 'https://radioid.net/static/users.json'
# Settings for log files
LOG_PATH = './log/' # MUST END IN '/'
LOG_NAME = 'hbmon.log'

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
#
# Version 2.0.1
###############################################################################
# Copyright (C) 2016-2019 Cortney T. Buffington, N0MJS <n0mjs@me.com>
#
@ -26,6 +26,12 @@
# HBMonitor v2 (2022) Version by Waldek SP2ONG
#
###############################################################################
###############################################################################
#
# Dockerised (2024) By ShaYmez M0VUB
#
###############################################################################
# Standard modules
import logging

View File

@ -3,4 +3,6 @@ dmr_utils3
bitstring
autobahn
jinja2==2.11.3
markupsafe==2.0.1
MarkupSafe==2.0.1
pyOpenSSL==23.1.1
service-identity==21.1.0