Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ plans/
releases/
release.sh

# myNode app build artifacts
rootfs/standard/usr/share/mynode_apps/*/dist/
2 changes: 1 addition & 1 deletion rootfs/standard/usr/share/mynode_apps/canary/canary.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Get instant notifications when your bitcoins move via ntfy push notifications.",
"Features include: transaction monitoring, RBF/CPFP detection, balance alerts, and deep wallet scanning."
],
"latest_version": "v1.5.0",
"latest_version": "v1.5.1",
"supported_archs": ["amd64", "arm64"],
"download_skip": true,
"requires_docker_image_installation": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ set -e

echo "==================== INSTALLING APP ===================="

VERSION="${VERSION:-v1.5.0}"
VERSION="${VERSION:-v1.5.1}"

remove_canary_images_by_name() {
local name="$1"
local images

images="$(docker images --format '{{.Repository}}:{{.Tag}}' | grep "$name" || true)"
[ -z "$images" ] && return 0

printf '%s\n' "$images" | xargs --no-run-if-empty docker rmi
}

mkdir -p /opt/mynode/canary || true
mkdir -p /mnt/hdd/mynode/canary || true
Expand All @@ -18,8 +28,8 @@ cp -f app_data/docker-compose.yml docker-compose.yml

/usr/local/bin/docker-compose down --remove-orphans 2>/dev/null || true

remove_docker_images_by_name "canary-backend"
remove_docker_images_by_name "canary-frontend"
remove_canary_images_by_name "canary-backend"
remove_canary_images_by_name "canary-frontend"

docker pull schjonhaug/canary-backend:$VERSION
docker pull schjonhaug/canary-frontend:$VERSION
Expand Down
17 changes: 17 additions & 0 deletions rootfs/standard/usr/share/mynode_apps/canary/scripts/pre_canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ generate_secret() {
tr -dc A-Za-z0-9 < /dev/urandom | head -c "$length"
}

service_is_enabled() {
local service_name="$1"
systemctl is-enabled "$service_name" > /dev/null 2>&1
}

cp -f app_data/docker-compose.yml docker-compose.yml

# Ensure data directory exists before starting.
Expand All @@ -30,5 +35,17 @@ CANARY_SELF_HOSTED_ADMIN_PASSWORD=$(cat "$ADMIN_PASSWORD_FILE")
JWT_SECRET=$(cat "$JWT_SECRET_FILE")
EOF

if service_is_enabled mempool; then
echo "CANARY_MEMPOOL_PORT=4080" >> "$ENV_FILE"
fi

if service_is_enabled btcrpcexplorer; then
echo "CANARY_BTC_RPC_EXPLORER_PORT=3002" >> "$ENV_FILE"
fi

if service_is_enabled mempool || service_is_enabled btcrpcexplorer; then
echo "CANARY_TX_EXPLORER_PLATFORM=mynode" >> "$ENV_FILE"
fi

chown -R bitcoin:bitcoin "$DATA_DIR"
chmod 600 "$ADMIN_PASSWORD_FILE" "$JWT_SECRET_FILE" "$ENV_FILE"
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ set -x

echo "==================== UNINSTALLING APP ===================="

remove_canary_images_by_name() {
local name="$1"
local images

images="$(docker images --format '{{.Repository}}:{{.Tag}}' | grep "$name" || true)"
[ -z "$images" ] && return 0

printf '%s\n' "$images" | xargs --no-run-if-empty docker rmi
}

cp -f app_data/docker-compose.yml docker-compose.yml 2>/dev/null || true
/usr/local/bin/docker-compose down --remove-orphans 2>/dev/null || true

remove_docker_images_by_name "canary-backend"
remove_docker_images_by_name "canary-frontend"
remove_docker_images_by_name "schjonhaug/canary-backend"
remove_docker_images_by_name "schjonhaug/canary-frontend"
remove_canary_images_by_name "canary-backend"
remove_canary_images_by_name "canary-frontend"
remove_canary_images_by_name "schjonhaug/canary-backend"
remove_canary_images_by_name "schjonhaug/canary-frontend"

rm -rf /mnt/hdd/mynode/canary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def canary_page():
"app_status": app_status,
"app_status_color": app_status_color,
"app": app,
"canary_username": "admin@local",
"canary_password": get_canary_password(),
}
return render_template("/app/canary/canary.html", **template_data)
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@
</div>
<div class="app_page_block_contents_text">
<table class="info_table" style="font-size: 12px; margin-left: 10px">
<tr>
<th>Username</th>
<td><span class="canary_credentials_value">{{canary_username}}</span></td>
</tr>
<tr>
<th>Password</th>
<td>
Expand Down