Add local/umbrel mode, rename containers to telegtrum, revert to named volumes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
ARG VERSION=4.7.2
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget curl \
|
||||
gnupg \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
python3-venv \
|
||||
python3-cryptography \
|
||||
libsecp256k1-dev \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY install.sh /usr/local/bin/install-electrum.sh
|
||||
RUN chmod +x /usr/local/bin/install-electrum.sh \
|
||||
&& /usr/local/bin/install-electrum.sh "${VERSION}"
|
||||
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN /opt/electrum/bin/pip install --quiet -r /app/requirements.txt
|
||||
|
||||
COPY bot.py /app/bot.py
|
||||
COPY entrypoint.local.sh /app/entrypoint.sh
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
@@ -0,0 +1,22 @@
|
||||
services:
|
||||
electrum:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.local
|
||||
args:
|
||||
VERSION: ${ELECTRUM_VERSION:-4.7.2}
|
||||
container_name: telegtrum
|
||||
env_file: .env
|
||||
environment:
|
||||
ALLOWED_USERS_FILE: /app/allowed_users.txt
|
||||
volumes:
|
||||
- ./electrum-data:/root/.electrum
|
||||
- ./allowed_users.txt:/app/allowed_users.txt:ro
|
||||
- ./bot.py:/app/bot.py:ro
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "electrum", "getinfo"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
dockerfile: Dockerfile.tor
|
||||
args:
|
||||
VERSION: ${ELECTRUM_VERSION:-4.7.2}
|
||||
container_name: electrum-tor
|
||||
container_name: telegtrum
|
||||
env_file: .env
|
||||
environment:
|
||||
ALLOWED_USERS_FILE: /app/allowed_users.txt
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ services:
|
||||
context: .
|
||||
args:
|
||||
VERSION: ${ELECTRUM_VERSION:-4.7.2}
|
||||
container_name: electrum
|
||||
container_name: telegtrum
|
||||
env_file: .env
|
||||
environment:
|
||||
ALLOWED_USERS_FILE: /app/allowed_users.txt
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
mkdir -p /root/.electrum/wallets
|
||||
|
||||
CONFIG="/root/.electrum/config"
|
||||
if [ ! -f "$CONFIG" ]; then
|
||||
echo "Writing default config..."
|
||||
cat > "$CONFIG" <<'EOF'
|
||||
{
|
||||
"auto_connect": false,
|
||||
"enable_proxy": false,
|
||||
"oneserver": true,
|
||||
"server": "umbrel.local:50001:t"
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
echo "Starting Electrum daemon..."
|
||||
rm -f /root/.electrum/daemon
|
||||
electrum daemon -d
|
||||
|
||||
echo "Electrum daemon started. Launching bot..."
|
||||
exec /opt/electrum/bin/python3 /app/bot.py
|
||||
Reference in New Issue
Block a user