Compare commits
9 Commits
0f9030b72e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 94e8d7bf84 | |||
| d16c025753 | |||
| 76ac4ea57a | |||
| d6bb39922a | |||
| 12b1f2f03d | |||
| fd0da1a59e | |||
| c7eb101ff0 | |||
| 26a5ecb2d0 | |||
| f9e73333ba |
Vendored
+4
@@ -8,6 +8,10 @@ signal-cli-data.bak.*
|
|||||||
# Local service file (contains your phone number) — use signal-bot.service.example
|
# Local service file (contains your phone number) — use signal-bot.service.example
|
||||||
signal-bot.service
|
signal-bot.service
|
||||||
|
|
||||||
|
# Runtime state (SQLite dedup cache) — created next to bot.py at runtime
|
||||||
|
bot-state.db
|
||||||
|
bot-state.db-*
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
venv/
|
venv/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ Signal ──► signal-cli-rest-api (json-rpc, :8080) ──► bot.py (sig
|
|||||||
python3 -m venv venv
|
python3 -m venv venv
|
||||||
venv/bin/pip install -r requirements.txt
|
venv/bin/pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
YouTube also needs a system `node` on PATH (for `yt-dlp-ejs`).
|
YouTube also needs **Node >= 22** on PATH (for `yt-dlp-ejs`'s challenge
|
||||||
|
solver). If your distro only ships an older Node, install a standalone Node 22+
|
||||||
|
and point `bot.py`'s `_NODE22` at it. Note: YouTube cookies are deliberately
|
||||||
|
withheld (`_cookie_args`) — sending account cookies forces yt-dlp onto a player
|
||||||
|
client whose media URLs 403; cookieless YouTube requests work.
|
||||||
|
|
||||||
3. **Cookies:** copy `cookies.txt.example` to `cookies.txt` and fill in real
|
3. **Cookies:** copy `cookies.txt.example` to `cookies.txt` and fill in real
|
||||||
exported cookies for the sites you want auth'd. (gitignored)
|
exported cookies for the sites you want auth'd. (gitignored)
|
||||||
|
|||||||
+11
-1
@@ -1,6 +1,10 @@
|
|||||||
services:
|
services:
|
||||||
signal-cli-rest-api:
|
signal-cli-rest-api:
|
||||||
image: bbernhard/signal-cli-rest-api:latest
|
# Pinned by digest so a re-pull/recreate can't silently swap in a build with
|
||||||
|
# a protocol change (the getServerGuid-style breakage). This digest is
|
||||||
|
# signal-cli-rest-api with signal-cli 0.100 (build 2). Upgrade deliberately:
|
||||||
|
# `docker pull bbernhard/signal-cli-rest-api:latest`, test, then update this.
|
||||||
|
image: bbernhard/signal-cli-rest-api@sha256:2399d449123cdad56c4d859277e3b9127e1a00c4d2ab4601c239882609286cf8
|
||||||
container_name: signal-cli-rest-api
|
container_name: signal-cli-rest-api
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
@@ -9,3 +13,9 @@ services:
|
|||||||
- "127.0.0.1:8080:8080"
|
- "127.0.0.1:8080:8080"
|
||||||
volumes:
|
volumes:
|
||||||
- ./signal-cli-data:/home/.local/share/signal-cli
|
- ./signal-cli-data:/home/.local/share/signal-cli
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8080/v1/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
start_period: 30s
|
||||||
|
|||||||
+8
-4
@@ -1,5 +1,9 @@
|
|||||||
signalbot
|
signalbot==1.1.0
|
||||||
yt-dlp
|
# yt-dlp is kept current for site/extractor changes; bump the floor deliberately.
|
||||||
|
# 2026.6.9 fixes a YouTube 403-on-data-download regression; it also requires the
|
||||||
|
# JS challenge to run on Node >= 22 (see below).
|
||||||
|
yt-dlp>=2026.6.9
|
||||||
# Needed for YouTube: yt-dlp wraps URLs in a JS "n-sig" challenge that a JS
|
# Needed for YouTube: yt-dlp wraps URLs in a JS "n-sig" challenge that a JS
|
||||||
# runtime must solve. Requires a system `node` on PATH plus this package.
|
# runtime must solve. Requires Node >= 22 on PATH (bot.py points at a standalone
|
||||||
yt-dlp-ejs
|
# /opt/node22 since Debian 13 only ships Node 20) plus this package.
|
||||||
|
yt-dlp-ejs>=0.8.0
|
||||||
|
|||||||
@@ -12,8 +12,19 @@ Environment=SIGNAL_PHONE_NUMBER=+15551234567
|
|||||||
Environment=SIGNAL_SERVICE=127.0.0.1:8080
|
Environment=SIGNAL_SERVICE=127.0.0.1:8080
|
||||||
# Optional: comma-separated numbers allowed to run /cookies (admin command).
|
# Optional: comma-separated numbers allowed to run /cookies (admin command).
|
||||||
# Environment=BOT_ADMINS=+15551234567
|
# Environment=BOT_ADMINS=+15551234567
|
||||||
|
# Optional: enable /force, which hosts oversized videos as temporary links.
|
||||||
|
# The bot rsyncs the file (over SSH) into a web-served directory and posts the URL;
|
||||||
|
# an hourly job deletes anything older than 24h and evicts oldest past 10 GB.
|
||||||
|
# Leave unset to disable /force. All three of REMOTE/REMOTE_DIR/BASE_URL are required.
|
||||||
|
# Environment=FORCE_REMOTE=user@webhost # ssh target that can write the docroot
|
||||||
|
# Environment=FORCE_REMOTE_DIR=/var/www/site/media # docroot on that host
|
||||||
|
# Environment=FORCE_BASE_URL=https://site/media # public URL serving that docroot
|
||||||
|
# Environment=FORCE_SSH_PORT=22 # ssh port (default 22)
|
||||||
|
# Environment=FORCE_SSH_KEY=/home/YOUR_USER/.ssh/id_ed25519 # ssh identity (optional)
|
||||||
ExecStart=/home/YOUR_USER/signal-bot/venv/bin/python bot.py
|
ExecStart=/home/YOUR_USER/signal-bot/venv/bin/python bot.py
|
||||||
Restart=on-failure
|
# always (not on-failure): the bot's library swallows exceptions in its own run
|
||||||
|
# loop and never exits non-zero even when wedged, so on-failure would never bounce it.
|
||||||
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in New Issue
Block a user