-
Notifications
You must be signed in to change notification settings - Fork 168
Add albyhub (v1.15.0) #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
70e5a2d
Add albyhub (v1.15.0)
tlindi 6f1c053
$MYNODE Dir was not usable
tlindi 0ebb6d3
Simplify datapath
tlindi 2c4069c
http-only bitcoin_app
tlindi 3d4bea5
change category to lightning_app
tlindi 60ec8c3
fixes
tlindi c1db518
Add albyhub (v1.15.0)
tlindi 8cdd302
Simplify datapath
tlindi 5f115e9
http-only bitcoin_app
tlindi d6bdf93
fixes
tlindi 8b6e573
Remove data deletion on reinstall
tlindi ef33e29
Remove unnessessary download_url info
tlindi 1bdb558
Update mynode_firewall.sh
tlindi 9128413
cleanup install
tlindi 2ebd1c8
download_skip
tlindi 0acc627
Clean Instructions
tlindi b177e92
restore https
tlindi 8eab252
clean references to data backup/restore
tlindi b5b4259
Fix Description
tlindi d556379
Remove version references
tlindi cdad212
Delete albyhub.html
tlindi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Empty file.
72 changes: 72 additions & 0 deletions
72
rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"name": "albyhub", | ||
"short_name": "albyhub", | ||
"author": { | ||
"name": "getAlby", | ||
"link": "https://www.albyhub.com" | ||
}, | ||
"website": { | ||
"name": "GitHub", | ||
"link": "https://github.com/getAlby/hub" | ||
}, | ||
"category": "lightning_app", | ||
"short_description": "Lightning Wallet", | ||
"description": [ | ||
"Alby Hub is a self-custodial, open source lightning wallet that connects to apps.", | ||
"Lightning Made Easy - Running your own node has never been easier.", | ||
"Set up your own LDK Lightning node in one click, top up channels via credit card or bank transfer,", | ||
"choose from the most reliable liquidity providers in the space and get 24/7 live support", | ||
"– all in one intuitive interface.", | ||
"You will also easily understand how the lightning network works and learning effortlessly along the way." | ||
], | ||
"latest_version": "v1.15.0", | ||
"supported_archs": null, | ||
"download_skip": true, | ||
"download_type": "source", | ||
"download_source_url": "not_required", | ||
"download_binary_url": { | ||
"aarch64": "download_url", | ||
"x86_64": "download_url" | ||
}, | ||
"install_env_vars": {}, | ||
"supports_app_page": true, | ||
"supports_testnet": false, | ||
"http_port": 8080, | ||
"https_port": 8081, | ||
"requires_bitcoin": false, | ||
"requires_docker_image_installation": true, | ||
"requires_electrs": false, | ||
"requires_lightning": false, | ||
"show_on_application_page": true, | ||
"show_on_homepage": true, | ||
"show_on_status_page": true, | ||
"hide_status_icon": false, | ||
"app_tile_name": "albyhub", | ||
"app_tile_running_status_text": "Running", | ||
"app_tile_button_text": "Info", | ||
"app_tile_button_href": "/app/albyhub/info", | ||
"app_page_show_open_button": true, | ||
"app_page_content": [ | ||
{ | ||
"heading": "Instructions", | ||
"content": [ | ||
"Alby Hub - Your Own Center for Internet Money", | ||
"On first login non-recoverable password will be created.", | ||
"Configuration with LDK will create non-custodial Lightning Node.", | ||
"Lightning node uses external services for Bitcoin Blockchain data and indexes. So disk space usage of Alby Hub is minimal.", | ||
"Make sure you have backups https://guides.getalby.com/user-guide/alby-account-and-browser-extension/alby-hub/backups-and-recover", | ||
"You can open the app with the Open button on the left.", | ||
"Enjoy!" | ||
] | ||
} | ||
], | ||
"can_uninstall": true, | ||
"can_reinstall": true, | ||
"can_enable_disable": true, | ||
"is_beta": false, | ||
"is_premium": false, | ||
"homepage_section": "apps", | ||
"homepage_order": 91, | ||
"app_type": "custom", | ||
"sdk_version": 2 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions
32
rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# albyhub service | ||
# /etc/systemd/system/albyhub.service | ||
|
||
[Unit] | ||
Description=albyhub | ||
Wants=www.service docker_images.service | ||
After=www.service docker_images.service | ||
|
||
[Service] | ||
WorkingDirectory=/opt/mynode/albyhub | ||
|
||
ExecStartPre=/usr/bin/is_not_shutting_down.sh | ||
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_albyhub.sh ]; then /bin/bash /usr/bin/service_scripts/pre_albyhub.sh; fi' | ||
ExecStart=docker run --rm \ | ||
--name albyhub \ | ||
--publish 8080:8080 \ | ||
--volume /mnt/hdd/mynode/albyhub:/data \ | ||
--env WORK_DIR='/data' \ | ||
albyhub | ||
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_albyhub.sh ]; then /bin/bash /usr/bin/service_scripts/post_albyhub.sh; fi' | ||
ExecStop=docker stop -t 2 albyhub | ||
|
||
User=bitcoin | ||
Group=bitcoin | ||
Type=simple | ||
TimeoutSec=120 | ||
Restart=always | ||
RestartSec=60 | ||
SyslogIdentifier=albyhub | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
17 changes: 17 additions & 0 deletions
17
rootfs/standard/usr/share/mynode_apps/albyhub/nginx/https_albyhub.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
server { | ||
listen 8081 ssl; | ||
server_name albyhub; | ||
|
||
include /etc/nginx/mynode/mynode_ssl_params.conf; | ||
include /etc/nginx/mynode/mynode_ssl_cert_key.conf; | ||
|
||
access_log /var/log/nginx/access_albyhub.log; | ||
error_log /var/log/nginx/error_albyhub.log; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:8080; | ||
|
||
include /etc/nginx/mynode/mynode_ssl_proxy_params.conf; | ||
} | ||
|
||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions
32
rootfs/standard/usr/share/mynode_apps/albyhub/scripts/install_albyhub.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
source /usr/share/mynode/mynode_device_info.sh | ||
source /usr/share/mynode/mynode_app_versions.sh | ||
|
||
set -x | ||
set -e | ||
|
||
echo "==================== INSTALLING APP ====================" | ||
|
||
# The current directory is the app install folder and the app tarball from GitHub | ||
# has already been downloaded and extracted. Any additional env variables specified | ||
# in the JSON file are also present. | ||
|
||
#echo "DOCKER NAME: $DOCKER_IMAGE_NAME" | ||
#echo "VERSION: $VERSION" | ||
|
||
# Make dir that is used as .service Workdirectory if not exist | ||
mkdir -p /opt/mynode/albyhub || true | ||
# Make dir that will be volume mounted to the container if not exist | ||
mkdir -p /mnt/hdd/mynode/albyhub || true | ||
# no backup / restore implemented | ||
|
||
# Clear any old images, only if they exist | ||
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'albyhub' | xargs --no-run-if-empty docker rmi | ||
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'ghcr.io/getalby/hub' | xargs --no-run-if-empty docker rmi | ||
|
||
# Pull ready dockers, instead of source | ||
docker pull ghcr.io/getalby/hub:$ALBYHUB_VERSION | ||
docker tag ghcr.io/getalby/hub:$ALBYHUB_VERSION albyhub | ||
|
||
echo "================== DONE INSTALLING APP =================" |
3 changes: 3 additions & 0 deletions
3
rootfs/standard/usr/share/mynode_apps/albyhub/scripts/post_albyhub.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
# This will run after launching the application |
3 changes: 3 additions & 0 deletions
3
rootfs/standard/usr/share/mynode_apps/albyhub/scripts/pre_albyhub.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
# This will run prior to launching the application |
16 changes: 16 additions & 0 deletions
16
rootfs/standard/usr/share/mynode_apps/albyhub/scripts/uninstall_albyhub.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
source /usr/share/mynode/mynode_device_info.sh | ||
source /usr/share/mynode/mynode_app_versions.sh | ||
|
||
echo "==================== UNINSTALLING APP ====================" | ||
|
||
# The app folder will be removed automatically after this script runs. You may not need to do anything here. | ||
|
||
# Clear any old images, only if they exist | ||
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'albyhub' | xargs --no-run-if-empty docker rmi | ||
docker images --format '{{.Repository}}:{{.Tag}}' | grep 'ghcr.io/getalby/hub' | xargs --no-run-if-empty docker rmi | ||
|
||
# no backup / restore implemented | ||
|
||
echo "================== DONE UNINSTALLING APP =================" |
32 changes: 32 additions & 0 deletions
32
rootfs/standard/usr/share/mynode_apps/albyhub/www/python/albyhub.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from flask import Blueprint, render_template, redirect | ||
from user_management import check_logged_in | ||
from enable_disable_functions import * | ||
from device_info import * | ||
from application_info import * | ||
from systemctl_info import * | ||
import subprocess | ||
import os | ||
|
||
|
||
mynode_albyhub = Blueprint('mynode_albyhub',__name__) | ||
|
||
|
||
### Page functions (have prefix /app/<app name/) | ||
@mynode_albyhub.route("/info") | ||
def albyhub_page(): | ||
check_logged_in() | ||
|
||
app = get_application("albyhub") | ||
app_status = get_application_status("albyhub") | ||
app_status_color = get_application_status_color("albyhub") | ||
|
||
# Load page | ||
templateData = { | ||
"title": "myNode - " + app["name"], | ||
"ui_settings": read_ui_settings(), | ||
"app_status": app_status, | ||
"app_status_color": app_status_color, | ||
"app": app | ||
} | ||
return render_template('/app/generic_app.html', **templateData) | ||
|
3 changes: 3 additions & 0 deletions
3
rootfs/standard/usr/share/mynode_apps/albyhub/www/templates/README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Custom Jinja templates (HTML files) can be added here for unique application pages | ||
|
||
Templates will be available under applications/<short_name>/xyz.html |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.