prometheus/deploy
Local Dev 8b76f16c1e prometheus: size-tiered pricing, 2 GiB cap, new hero copy, SEO LD
Three threads, one commit:

1. Size-tiered listing fee instead of a flat $1

   priceUsdForSize(bytes) in service/payments.js:
     0 - 100 MiB         → free
     100.001 - 200 MiB   → $1
     200.001 - 300 MiB   → $2
     ...
     1900.001 - 2000 MiB → $19
     2000.001 - 2048 MiB → $20 (ceiling at 2 GiB)

   listingNeedsPayment(bytes) replaces paymentsRequired() — a free-tier
   upload always publishes immediately even when PAYMENT_REQUIRED=1; the
   operator switch only governs the paid tiers. createInvoice derives the
   fee from the listing's own size at invoice time.

2. Upload cap back to 2 GiB

   The 200-MiB cap from the previous commit (which fixed the Caddy-413
   HTML bug) is reverted. The paywall is now the real size gate; Caddy
   is just the ceiling. p2pexchange Caddyfile already updated + reloaded.

3. Hero + SEO

   Hero leads with the plain-English product category:
     The decentralized app store.
     A home for apps, programs, dApps, and libraries — listed and settled
     on the Bitcoin Cash chain, hosted on the decentralized web, endorsed
     by signature. Anyone can publish. Nobody can gatekeep.

     Named for the one who gave fire to humans and did not ask the gods first.

   "hosted on Sia" → "hosted on the decentralized web". Sia is the
   mechanism, not the pitch — general readers aren't tripped on the
   acronym on the hero.

   Meta description rewritten to lead with "decentralized app store" and
   name the long-tail terms the audience searches for ("web3 browsers",
   "BCH wallets", "mobile and desktop apps").

   Two JSON-LD blocks (WebSite + Organization) inlined on home via
   layout's headExtra channel — knowledge panel + WebSite result card.

4. Submit wizard

   Step 1 result shows the computed listing fee under the scan verdict,
   so publishers see the price BEFORE filling out the manifest.

   Step 4 publish branches on the server's payment_required flag. On a
   paid listing it POSTs /api/invoice right after the listing POST and
   renders a payment card with the exact sat amount, the operator receive
   address, a `bitcoincash:` URI the wallet opens, and the invoice status
   URL for polling.
2026-10-22 23:31:43 +03:00
..
apps-silentmode-st.conf prometheus: size-tiered pricing, 2 GiB cap, new hero copy, SEO LD 2026-10-22 23:31:43 +03:00
docker-compose.yml prometheus: add ClamAV sidecar — real uploads can scan now 2026-10-09 21:58:56 +02:00
Dockerfile prometheus: Dockerfile + docker-compose for the sidecar deploy 2026-10-09 00:47:40 +02:00
make-tls-cert.sh prometheus: deploy — systemd unit, angie vhost, TLS pin, deploy recipe 2026-10-08 21:53:40 +02:00
prometheus-service.service prometheus: deploy — systemd unit, angie vhost, TLS pin, deploy recipe 2026-10-08 21:53:40 +02:00
prometheus-snapshot.service prometheus: rework snapshot timer unit for the docker deploy 2026-10-11 00:58:53 +02:00
prometheus-snapshot.timer prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
prometheus-x.conf prometheus: size-tiered pricing, 2 GiB cap, new hero copy, SEO LD 2026-10-22 23:31:43 +03:00
README.md prometheus: deploy — systemd unit, angie vhost, TLS pin, deploy recipe 2026-10-08 21:53:40 +02:00

Prometheus — deploy

Everything in this directory lands on a VPS the first time Prometheus is set up on it, plus files that get swapped out on each release.

deploy/
  prometheus-service.service        systemd unit — the Node service on :3700
  prometheus-x.conf                 angie vhost — TLS-terminated reverse proxy
  prometheus-snapshot.service       systemd unit — weekly snapshot job
  prometheus-snapshot.timer         systemd timer — Sunday 04:00 UTC
  apps-silentmode-st.conf           angie vhost — SEO mirror (apps.silentmode.st)
  make-tls-cert.sh                  (re-)generate the self-signed cert, print the pin

First-time install (VPS, root)

# Code
useradd -r -s /usr/sbin/nologin -d /opt/prometheus prometheus
mkdir -p /opt/prometheus
rsync -av --exclude=node_modules --exclude=db.sqlite\* --exclude=uploads \
          --exclude=.keys --exclude=build \
          <workstation>:Prometheus/ /opt/prometheus/
cd /opt/prometheus && npm install --omit=dev
chown -R prometheus:prometheus /opt/prometheus
mkdir -p /opt/prometheus/{uploads,.keys,build}
chown prometheus:prometheus /opt/prometheus/{uploads,.keys,build}

# TLS cert for prometheus.x (prints the fingerprint — save it for #6)
sudo bash /opt/prometheus/deploy/make-tls-cert.sh

# angie
install -m644 /opt/prometheus/deploy/prometheus-x.conf     /etc/angie/http.d/
install -m644 /opt/prometheus/deploy/apps-silentmode-st.conf /etc/angie/http.d/
angie -t && systemctl reload angie

# systemd
install -m644 /opt/prometheus/deploy/prometheus-service.service   /etc/systemd/system/
install -m644 /opt/prometheus/deploy/prometheus-snapshot.service  /etc/systemd/system/
install -m644 /opt/prometheus/deploy/prometheus-snapshot.timer    /etc/systemd/system/

# Instance-specific environment (NOT in the repo)
cat > /etc/default/prometheus <<EOF
ADMIN_PUBLISHER=<a BNS name you own>
# VIRUSTOTAL_API_KEY=<key>              # optional
# PAYMENT_REQUIRED=1                    # enable paid wave
# PROMETHEUS_PAYMENT_ADDRESS=<cashaddr> # required when PAYMENT_REQUIRED=1
# PROMETHEUS_LISTING_FEE_USD=1
EOF
chmod 600 /etc/default/prometheus

systemctl daemon-reload
systemctl enable --now prometheus-service.service
systemctl enable --now prometheus-snapshot.timer

# Verify
curl -k https://127.0.0.1/healthz    # should return 200 and {ok:true,…}

Register the on-chain record (workstation)

IP=$(curl -s https://ifconfig.io)       # or the VPS's public IP as you know it
TLS=<the fingerprint make-tls-cert.sh printed>

node Argus/src/register.js prometheus.x "{\"ip\":\"$IP\",\"tls\":\"$TLS\"}"
# Prompts for the chipnet keystore password (or set DEVIANT_KEYSTORE_PASSWORD).

The current record (as of 2026-10-08) is {"u":"https://silentmode.st/prometheus/"}. The register command above replaces it. Within a few minutes of the TX confirming on chipnet, Theseus and Ariadne resolve prometheus.x to the live service rather than the silentmode.st teaser.

Updates

Code: rsync Prometheus/ again, npm install --omit=dev (safe no-op if deps unchanged), systemctl restart prometheus-service.

Snapshot: nothing to do — the timer runs itself.

Cert rotation: re-run make-tls-cert.sh, grab the new fingerprint, re-register the tls record, reload angie. Theseus and Ariadne pick up the new cert as soon as the record TX confirms.

Rollback

Code: rsync the previous checkout, restart. There is no "schema down migration" discipline yet — the DB file is append-only in practice (new columns, new tables); if a rollback hits a schema change you have to decide what to do with the newer rows.

Record: node Argus/src/register.js prometheus.x '{"u":"https://silentmode.st/prometheus/"}' puts the name back to redirecting at the ICANN mirror. Takes the same few minutes as any other record change.