Compare commits
8
Commits
arcbtc-patch-2
...
v1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cc6a96433 | ||
|
|
e5ff928c3c | ||
|
|
f31ffba06c | ||
|
|
1163e44265 | ||
|
|
266b16834b | ||
|
|
ad606b2517 | ||
|
|
1ec28079d9 | ||
|
|
aeaddc1dc6 |
+1
-1
@@ -1 +1 @@
|
|||||||
custom: https://demo.lnbits.com/lnurlp/link/fH59GD
|
custom: https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg
|
||||||
|
|||||||
@@ -5,23 +5,19 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-linux-package:
|
build-linux-package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
# Step 1: Checkout the repository
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Step 2: Set up Python (uv will still use this toolchain)
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
|
|
||||||
# Step 3: Install system deps (fuse) + uv
|
|
||||||
- name: Install system deps and uv
|
- name: Install system deps and uv
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -30,7 +26,6 @@ jobs:
|
|||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Optional: Cache uv + venv to speed up CI
|
|
||||||
- name: Cache uv and venv
|
- name: Cache uv and venv
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@@ -39,7 +34,6 @@ jobs:
|
|||||||
.venv
|
.venv
|
||||||
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock', 'pyproject.toml') }}
|
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock', 'pyproject.toml') }}
|
||||||
|
|
||||||
# Step 4: Prepare packaging tree and clone LNbits
|
|
||||||
- name: Prepare packaging & clone LNbits
|
- name: Prepare packaging & clone LNbits
|
||||||
run: |
|
run: |
|
||||||
mv .github/packaging packaging
|
mv .github/packaging packaging
|
||||||
@@ -47,18 +41,11 @@ jobs:
|
|||||||
git clone https://github.com/lnbits/lnbits.git packaging/linux/AppDir/usr/lnbits
|
git clone https://github.com/lnbits/lnbits.git packaging/linux/AppDir/usr/lnbits
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Step 5: Build the LNbits binary with uv + PyInstaller
|
|
||||||
- name: Build LNbits binary (uv + PyInstaller)
|
- name: Build LNbits binary (uv + PyInstaller)
|
||||||
run: |
|
run: |
|
||||||
cd packaging/linux/AppDir/usr/lnbits
|
cd packaging/linux/AppDir/usr/lnbits
|
||||||
|
uv sync --all-extras --no-dev
|
||||||
# Install project deps into .venv using uv
|
|
||||||
uv sync
|
|
||||||
|
|
||||||
# Install PyInstaller into the same environment
|
|
||||||
uv pip install pyinstaller
|
uv pip install pyinstaller
|
||||||
|
|
||||||
# Build the LNbits binary
|
|
||||||
uv run pyinstaller \
|
uv run pyinstaller \
|
||||||
--onefile \
|
--onefile \
|
||||||
--name lnbits \
|
--name lnbits \
|
||||||
@@ -66,6 +53,10 @@ jobs:
|
|||||||
--collect-all embit \
|
--collect-all embit \
|
||||||
--collect-all lnbits \
|
--collect-all lnbits \
|
||||||
--collect-all sqlalchemy \
|
--collect-all sqlalchemy \
|
||||||
|
--collect-all breez_sdk \
|
||||||
|
--collect-binaries breez_sdk \
|
||||||
|
--collect-all breez_sdk_liquid \
|
||||||
|
--collect-binaries breez_sdk_liquid \
|
||||||
--collect-all aiosqlite \
|
--collect-all aiosqlite \
|
||||||
--hidden-import=passlib.handlers.bcrypt \
|
--hidden-import=passlib.handlers.bcrypt \
|
||||||
"$(uv run which lnbits)"
|
"$(uv run which lnbits)"
|
||||||
@@ -75,7 +66,7 @@ jobs:
|
|||||||
chmod +x packaging/linux/AppDir/lnbits.desktop
|
chmod +x packaging/linux/AppDir/lnbits.desktop
|
||||||
chmod +x packaging/linux/AppDir/usr/lnbits/dist/lnbits
|
chmod +x packaging/linux/AppDir/usr/lnbits/dist/lnbits
|
||||||
|
|
||||||
# Clean out non-dist content from the app dir to keep AppImage slim
|
# keep AppDir slim
|
||||||
find packaging/linux/AppDir/usr/lnbits -mindepth 1 -maxdepth 1 \
|
find packaging/linux/AppDir/usr/lnbits -mindepth 1 -maxdepth 1 \
|
||||||
! -name 'dist' \
|
! -name 'dist' \
|
||||||
! -name 'lnbits' \
|
! -name 'lnbits' \
|
||||||
@@ -91,9 +82,14 @@ jobs:
|
|||||||
packaging/linux/AppDir "$APPIMAGE_NAME"
|
packaging/linux/AppDir "$APPIMAGE_NAME"
|
||||||
chmod +x "$APPIMAGE_NAME"
|
chmod +x "$APPIMAGE_NAME"
|
||||||
echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
|
echo "APPIMAGE_NAME=$APPIMAGE_NAME" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# 🔎 quick audit: show glibc versions referenced by the binary
|
||||||
|
echo "Runner glibc:"
|
||||||
|
ldd --version | head -n1 || true
|
||||||
|
echo "Symbols needed by lnbits:"
|
||||||
|
strings "$APPIMAGE_NAME" | grep -o 'GLIBC_[0-9.]*' | sort -u || true
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Step 6: Upload Linux Release Asset
|
|
||||||
- name: Upload Linux Release Asset
|
- name: Upload Linux Release Asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM boltz/boltz-client:latest AS boltz
|
FROM boltz/boltz-client:2.8.3 AS boltz
|
||||||
|
|
||||||
FROM lnbits/lnbits:latest
|
FROM lnbits/lnbits:latest
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Note that by default LNbits uses SQLite as its database, which is simple and eff
|
|||||||
Go to [releases](https://github.com/lnbits/lnbits/releases) and pull latest AppImage, or:
|
Go to [releases](https://github.com/lnbits/lnbits/releases) and pull latest AppImage, or:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install libfuse2
|
sudo apt-get install jq libfuse2
|
||||||
wget $(curl -s https://api.github.com/repos/lnbits/lnbits/releases/latest | jq -r '.assets[] | select(.name | endswith(".AppImage")) | .browser_download_url') -O LNbits-latest.AppImage
|
wget $(curl -s https://api.github.com/repos/lnbits/lnbits/releases/latest | jq -r '.assets[] | select(.name | endswith(".AppImage")) | .browser_download_url') -O LNbits-latest.AppImage
|
||||||
chmod +x LNbits-latest.AppImage
|
chmod +x LNbits-latest.AppImage
|
||||||
LNBITS_ADMIN_UI=true HOST=0.0.0.0 PORT=5000 ./LNbits-latest.AppImage # most system settings are now in the admin UI, but pass additional .env variables here
|
LNBITS_ADMIN_UI=true HOST=0.0.0.0 PORT=5000 ./LNbits-latest.AppImage # most system settings are now in the admin UI, but pass additional .env variables here
|
||||||
@@ -132,7 +132,7 @@ Now visit `0.0.0.0:5000` to make a super-user account.
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download)
|
# Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download)
|
||||||
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
|
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon --yes
|
||||||
|
|
||||||
# Enable nix-command and flakes experimental features for nix:
|
# Enable nix-command and flakes experimental features for nix:
|
||||||
grep -qxF 'experimental-features = nix-command flakes' /etc/nix/nix.conf || \
|
grep -qxF 'experimental-features = nix-command flakes' /etc/nix/nix.conf || \
|
||||||
@@ -145,16 +145,29 @@ echo "trusted-users = root $USER" | sudo tee -a /etc/nix/nix.conf
|
|||||||
# Restart daemon so changes apply
|
# Restart daemon so changes apply
|
||||||
sudo systemctl restart nix-daemon
|
sudo systemctl restart nix-daemon
|
||||||
|
|
||||||
|
# Clone and build LNbits
|
||||||
|
git clone https://github.com/lnbits/lnbits.git
|
||||||
|
cd lnbits
|
||||||
|
|
||||||
|
# Make data directory and persist data/extension folders
|
||||||
|
mkdir data
|
||||||
|
PROJECT_DIR="$(pwd)"
|
||||||
|
{
|
||||||
|
echo "export PYTHONPATH=\"$PROJECT_DIR/ns:\$PYTHONPATH\""
|
||||||
|
echo "export LNBITS_DATA_FOLDER=\"$PROJECT_DIR/data\""
|
||||||
|
echo "export LNBITS_EXTENSIONS_PATH=\"$PROJECT_DIR\""
|
||||||
|
} >> ~/.bashrc
|
||||||
|
grep -qxF '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ~/.bashrc || \
|
||||||
|
echo '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' >> ~/.bashrc
|
||||||
|
. ~/.bashrc
|
||||||
|
|
||||||
# Add cachix for cached binaries
|
# Add cachix for cached binaries
|
||||||
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
||||||
cachix use lnbits
|
cachix use lnbits
|
||||||
|
|
||||||
# Clone and build LNbits
|
# Build LNbits
|
||||||
git clone https://github.com/lnbits/lnbits.git
|
|
||||||
cd lnbits
|
|
||||||
nix build
|
nix build
|
||||||
|
|
||||||
mkdir data
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Running the server
|
#### Running the server
|
||||||
|
|||||||
@@ -1,53 +1,75 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# Check install has not already run
|
# --- Config you might tweak ---
|
||||||
if [ ! -d lnbits/data ]; then
|
REPO_URL="https://github.com/lnbits/lnbits.git"
|
||||||
|
BRANCH="main"
|
||||||
|
APP_DIR="${PWD}/lnbits"
|
||||||
|
HOST="${HOST:-0.0.0.0}"
|
||||||
|
PORT="${PORT:-5000}"
|
||||||
|
ADMIN_UI="${LNBITS_ADMIN_UI:-true}"
|
||||||
|
# -------------------------------
|
||||||
|
|
||||||
# Update package list and install prerequisites non-interactively
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
sudo apt update -y
|
|
||||||
sudo apt install -y software-properties-common
|
|
||||||
|
|
||||||
# Add the deadsnakes PPA repository non-interactively
|
# Ensure basic tooling
|
||||||
sudo add-apt-repository -y ppa:deadsnakes/ppa
|
if ! command -v curl >/dev/null 2>&1 || ! command -v git >/dev/null 2>&1; then
|
||||||
|
sudo apt-get update -y
|
||||||
# Install Python 3.10 and distutils non-interactively
|
sudo apt-get install -y curl git
|
||||||
sudo apt install -y python3.10 python3.10-distutils
|
|
||||||
|
|
||||||
# Install UV
|
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
||||||
|
|
||||||
export PATH="/home/$USER/.local/bin:$PATH"
|
|
||||||
|
|
||||||
if [ ! -d lnbits/wallets ]; then
|
|
||||||
# Clone the LNbits repository
|
|
||||||
git clone https://github.com/lnbits/lnbits.git
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Failed to clone the repository ... FAIL"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Ensure we are in the lnbits directory
|
|
||||||
cd lnbits || { echo "Failed to cd into lnbits ... FAIL"; exit 1; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
git checkout main
|
|
||||||
# Make data folder
|
|
||||||
mkdir data
|
|
||||||
|
|
||||||
# Copy the .env.example to .env
|
|
||||||
cp .env.example .env
|
|
||||||
|
|
||||||
elif [ ! -d lnbits/wallets ]; then
|
|
||||||
# cd into lnbits
|
|
||||||
cd lnbits || { echo "Failed to cd into lnbits ... FAIL"; exit 1; }
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the dependencies using UV
|
# System build deps and secp headers
|
||||||
uv sync --all-extras
|
if command -v apt-get >/dev/null 2>&1; then
|
||||||
|
sudo apt-get update -y
|
||||||
|
sudo apt-get install -y \
|
||||||
|
pkg-config \
|
||||||
|
build-essential \
|
||||||
|
libsecp256k1-dev \
|
||||||
|
automake \
|
||||||
|
autoconf \
|
||||||
|
libtool \
|
||||||
|
m4
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install uv (if missing)
|
||||||
|
if ! command -v uv >/dev/null 2>&1; then
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
# Ensure PATH for current session
|
||||||
|
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
# Set environment variables for LNbits
|
# Clone or reuse repo
|
||||||
export LNBITS_ADMIN_UI=true
|
if [[ ! -d "$APP_DIR/.git" ]]; then
|
||||||
export HOST=0.0.0.0
|
git clone "$REPO_URL" "$APP_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
# Run LNbits
|
cd "$APP_DIR"
|
||||||
uv run lnbits
|
git fetch --all --prune
|
||||||
|
git checkout "$BRANCH"
|
||||||
|
git pull --ff-only || true
|
||||||
|
|
||||||
|
# First-run setup
|
||||||
|
mkdir -p data
|
||||||
|
[[ -f .env ]] || cp .env.example .env || true
|
||||||
|
|
||||||
|
# Prefer system libsecp256k1 (avoid autotools path)
|
||||||
|
export SECP_BUNDLED=0
|
||||||
|
|
||||||
|
# Sync dependencies with Python 3.12
|
||||||
|
uv sync --python 3.12 --all-extras --no-dev
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
export LNBITS_ADMIN_UI="$ADMIN_UI"
|
||||||
|
export HOST="$HOST"
|
||||||
|
export PORT="$PORT"
|
||||||
|
|
||||||
|
# Open firewall (optional)
|
||||||
|
if command -v ufw >/dev/null 2>&1; then
|
||||||
|
sudo ufw allow "$PORT"/tcp || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run LNbits with Python 3.12 via uv
|
||||||
|
exec uv run --python 3.12 lnbits
|
||||||
|
|||||||
@@ -76,19 +76,25 @@
|
|||||||
icon="add"
|
icon="add"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
</q-input>
|
</q-input>
|
||||||
<div>
|
|
||||||
<q-chip
|
|
||||||
v-for="identifier in formData.lnbits_nostr_notifications_identifiers"
|
|
||||||
:key="identifier"
|
|
||||||
removable
|
|
||||||
@remove="removeNostrNotificationIdentifier(identifier)"
|
|
||||||
color="primary"
|
|
||||||
text-color="white"
|
|
||||||
><span class="ellipsis" v-text="identifier"></span
|
|
||||||
></q-chip>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
<div>
|
||||||
|
<q-chip
|
||||||
|
v-for="identifier in formData.lnbits_nostr_notifications_identifiers"
|
||||||
|
:key="identifier"
|
||||||
|
removable
|
||||||
|
@remove="removeNostrNotificationIdentifier(identifier)"
|
||||||
|
color="primary"
|
||||||
|
text-color="white"
|
||||||
|
class="ellipsis"
|
||||||
|
:label="identifier"
|
||||||
|
><q-tooltip
|
||||||
|
v-if="identifier"
|
||||||
|
anchor="top middle"
|
||||||
|
self="bottom middle"
|
||||||
|
><span v-text="identifier"></span></q-tooltip
|
||||||
|
></q-chip>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-12 col-md-6">
|
<div class="col-sm-12 col-md-6">
|
||||||
|
|||||||
@@ -113,8 +113,9 @@ async def api_fiat_as_sats(data: ConversionData):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
@api_router.get("/api/v1/qrcode", response_class=StreamingResponse)
|
||||||
@api_router.get("/api/v1/qrcode/{data}", response_class=StreamingResponse)
|
@api_router.get("/api/v1/qrcode/{data}", response_class=StreamingResponse)
|
||||||
async def img(data):
|
async def img(data: str):
|
||||||
qr = pyqrcode.create(data)
|
qr = pyqrcode.create(data)
|
||||||
stream = BytesIO()
|
stream = BytesIO()
|
||||||
qr.svg(stream, scale=3)
|
qr.svg(stream, scale=3)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "lnbits"
|
name = "lnbits"
|
||||||
version = "1.3.0-rc8"
|
version = "1.3.0"
|
||||||
requires-python = ">=3.10,<3.13"
|
requires-python = ">=3.10,<3.13"
|
||||||
description = "LNbits, free and open-source Lightning wallet and accounts system."
|
description = "LNbits, free and open-source Lightning wallet and accounts system."
|
||||||
authors = [{ name = "Alan Bits", email = "alan@lnbits.com" }]
|
authors = [{ name = "Alan Bits", email = "alan@lnbits.com" }]
|
||||||
|
|||||||
Reference in New Issue
Block a user