Add /receipt/, an admin-gated proxy to the receipt printer on stppi
The receipt_maker repo's `receipt serve` runs on stppi, which reaches the Epson printer over the home LAN, and serves a page for printing a note or an uploaded image. nginx gates /receipt/ on the admin session like /tracker/, strips the prefix, adds the shared X-Receipt-Token and proxies over Tailscale to RECEIPT_WEB_UPSTREAM (the one upstream off this host). When stppi is unreachable, @receipt_offline answers 503 instead of a bare 502. Both variables are defaulted in entrypoint.sh, and the token is quoted in the template, so an unset pair still renders a valid config (/receipt/ then reads "offline"). The admin panel links to the page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -275,6 +275,18 @@ ACTIVITY_TRACKER_IMAGE_TAG=
|
||||
# IANA timezone that decides where a "day" starts in daily summaries. Blank is UTC.
|
||||
TRACKER_TZ=Europe/London
|
||||
|
||||
# --- Receipt printer (/receipt/) ---------------------------------------------
|
||||
# Not a container here: `receipt serve` (adamf/receipt_maker) runs on stppi,
|
||||
# which reaches the printer over the home LAN, and nginx proxies to it over
|
||||
# Tailscale.
|
||||
# host:port of that server, by Tailscale IP. Blank points nowhere and
|
||||
# /receipt/ answers "offline".
|
||||
RECEIPT_WEB_UPSTREAM=100.107.152.119:8765
|
||||
# Shared secret nginx adds as X-Receipt-Token; the same value as
|
||||
# RECEIPT_WEB_TOKEN in stppi's ~/.config/receipt-web.env. Generate with
|
||||
# `openssl rand -hex 32`. Changing it needs `docker compose up -d nginx`.
|
||||
RECEIPT_WEB_TOKEN=
|
||||
|
||||
# TfL Unified API key (500 req/min); used by the Python hotel finder
|
||||
TFL_APP_KEY=
|
||||
|
||||
|
||||
Reference in New Issue
Block a user