mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Add building docker image workaround and more info
This commit is contained in:
parent
fdbee0c7c8
commit
793507b094
|
@ -12,6 +12,7 @@
|
|||
/var/log/www.log
|
||||
/var/log/bitcoind.log
|
||||
/var/log/unlock_lnd.log
|
||||
/var/log/mynode_docker_images.log
|
||||
{
|
||||
rotate 2
|
||||
daily
|
||||
|
|
2
rootfs/standard/etc/rsyslog.d/docker_images.conf
Normal file
2
rootfs/standard/etc/rsyslog.d/docker_images.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
if $programname == 'mynode_docker_images' then /var/log/mynode_docker_images.log
|
||||
& stop
|
|
@ -5,15 +5,19 @@ set -x
|
|||
|
||||
source /usr/share/mynode/mynode_config.sh
|
||||
|
||||
echo "Starting mynode_docker_images.sh ..."
|
||||
|
||||
# Drive should be mounted, let's still wait a bit
|
||||
sleep 60s
|
||||
|
||||
# Loop and check every 1 day
|
||||
while [ 1 ]; do
|
||||
|
||||
echo "Checking for building new docker images..."
|
||||
touch /tmp/installing_docker_images
|
||||
|
||||
# Upgrade WebSSH2
|
||||
echo "Checking for new webssh2..."
|
||||
WEBSSH2_UPGRADE_URL=https://github.com/billchurch/webssh2/archive/v0.2.10-0.tar.gz
|
||||
WEBSSH2_UPGRADE_URL_FILE=/mnt/hdd/mynode/settings/webssh2_url
|
||||
CURRENT=""
|
||||
|
@ -35,6 +39,7 @@ while [ 1 ]; do
|
|||
fi
|
||||
|
||||
# Upgrade mempool.space
|
||||
echo "Checking for new mempool.space..."
|
||||
if [ $IS_PREMIUM -eq 1 ]; then
|
||||
MEMPOOLSPACE_UPGRADE_URL=https://github.com/mempool-space/mempool.space/archive/master.zip
|
||||
MEMPOOLSPACE_UPGRADE_URL_FILE=/mnt/hdd/mynode/settings/mempoolspace_url
|
||||
|
@ -59,5 +64,6 @@ while [ 1 ]; do
|
|||
rm -f /tmp/installing_docker_images
|
||||
|
||||
# Check again in a day
|
||||
echo "Waiting a day..."
|
||||
sleep 24h
|
||||
done
|
||||
|
|
|
@ -239,15 +239,15 @@ def index():
|
|||
}
|
||||
return render_template('state.html', **templateData)
|
||||
|
||||
if is_installing_docker_images():
|
||||
message = "<div class='small_message'>{}</<div>".format( get_message(include_funny=True) )
|
||||
templateData = {
|
||||
"title": "myNode Status",
|
||||
"header_text": "Starting...",
|
||||
"subheader_text": Markup("Building Docker Images...{}".format(message)),
|
||||
"ui_settings": read_ui_settings()
|
||||
}
|
||||
return render_template('state.html', **templateData)
|
||||
# if is_installing_docker_images():
|
||||
# message = "<div class='small_message'>{}</<div>".format( get_message(include_funny=True) )
|
||||
# templateData = {
|
||||
# "title": "myNode Status",
|
||||
# "header_text": "Starting...",
|
||||
# "subheader_text": Markup("Building Docker Images...{}".format(message)),
|
||||
# "ui_settings": read_ui_settings()
|
||||
# }
|
||||
# return render_template('state.html', **templateData)
|
||||
|
||||
# Display sync info if not synced
|
||||
if not is_bitcoind_synced():
|
||||
|
|
|
@ -95,24 +95,31 @@ def page_settings():
|
|||
# Get LND Status
|
||||
lnd_status = ""
|
||||
try:
|
||||
lnd_status = subprocess.check_output("journalctl --unit=lnd --no-pager | tail -n 100", shell=True).decode("utf8")
|
||||
lnd_status = subprocess.check_output("journalctl --unit=lnd --no-pager | tail -n 200", shell=True).decode("utf8")
|
||||
except:
|
||||
lnd_status = "ERROR"
|
||||
|
||||
# Get Tor Status
|
||||
tor_status = ""
|
||||
try:
|
||||
tor_status = subprocess.check_output("journalctl --unit=tor@default --no-pager | tail -n 100", shell=True).decode("utf8")
|
||||
tor_status = subprocess.check_output("journalctl --unit=tor@default --no-pager | tail -n 200", shell=True).decode("utf8")
|
||||
except:
|
||||
tor_status = "ERROR"
|
||||
|
||||
# Get Electrs Status
|
||||
electrs_status = ""
|
||||
try:
|
||||
electrs_status = subprocess.check_output("journalctl --unit=electrs --no-pager | tail -n 100", shell=True).decode("utf8")
|
||||
electrs_status = subprocess.check_output("journalctl --unit=electrs --no-pager | tail -n 200", shell=True).decode("utf8")
|
||||
except:
|
||||
electrs_status = "ERROR"
|
||||
|
||||
# Get Docker Image Build Status
|
||||
docker_image_build_status = ""
|
||||
try:
|
||||
docker_image_build_status = subprocess.check_output("journalctl --unit=docker_images --no-pager | tail -n 200", shell=True).decode("utf8")
|
||||
except:
|
||||
docker_image_build_status = "ERROR"
|
||||
|
||||
# Get QuickSync Rates
|
||||
upload_rate = 100
|
||||
download_rate = 100
|
||||
|
@ -141,6 +148,7 @@ def page_settings():
|
|||
"lnd_status": lnd_status,
|
||||
"tor_status": tor_status,
|
||||
"electrs_status": electrs_status,
|
||||
"docker_image_build_status": docker_image_build_status,
|
||||
"is_quicksync_disabled": not is_quicksync_enabled(),
|
||||
"is_netdata_enabled": is_netdata_enabled(),
|
||||
"is_uploader_device": is_uploader(),
|
||||
|
|
|
@ -199,6 +199,11 @@
|
|||
$("#electrs_status").show();
|
||||
});
|
||||
|
||||
$("#show_docker_image_build_status").on("click", function() {
|
||||
$("#show_docker_image_build_status").hide(0);
|
||||
$("#docker_image_build_status").show();
|
||||
});
|
||||
|
||||
$("#show_mynode_changelog").on("click", function() {
|
||||
if (showChangelog)
|
||||
{
|
||||
|
@ -472,6 +477,11 @@
|
|||
<div class="settings_block_subheader">Electrum Server Status</div>
|
||||
<button id="show_electrs_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
|
||||
<div id="electrs_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{electrs_status}}</pre></div>
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="settings_block_subheader">Docker Image Build Status</div>
|
||||
<button id="show_docker_image_build_status" class="ui-button ui-widget ui-corner-all settings_button">Show</button>
|
||||
<div id="docker_image_build_status" style='text-align: left; font-size: 12px; width: 800px; display: none;'><pre>{{docker_image_build_status}}</pre></div>
|
||||
</div>
|
||||
|
||||
<div class="settings_block">
|
||||
|
|
Loading…
Reference in New Issue
Block a user