prometheus/deploy/prometheus-x.conf

49 lines
1.9 KiB
Text
Raw Permalink Normal View History

# prometheus.x — the standalone service, served by this VPS.
#
# BCNR serves this name via its `ip`+`tls` records: Theseus and Ariadne
# resolve prometheus.x by fetching the on-chain record, which says
# "connect to <this IP>, pin the TLS cert whose DER sha256 equals <this
# fingerprint>". The resolver reverse-proxies to this vhost; a browser
# with Ariadne's Thread installed does the same.
#
# The cert is self-signed and pinned on chain — no CA is involved and
# none needs to be, which is a narrower claim than a CA makes and does
# not expire on anyone else's schedule. Rotating is one record update.
#
# To regenerate the cert and read out its DER sha256:
# bash /opt/prometheus/deploy/make-tls-cert.sh
#
# The vhost listens only on HTTPS; the on-chain `tls` pin means plain
# HTTP would be refused by the resolver anyway, and we do not want a
# scanner to be able to read ANYTHING here over cleartext.
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name prometheus.x;
ssl_certificate /etc/ssl/prometheus-x/fullchain.pem;
ssl_certificate_key /etc/ssl/prometheus-x/privkey.pem;
# The TLS resolver reaches us over the raw IP but passes `prometheus.x`
# as the Host header. The service's canonical URL generator looks at
# that header; preserving it keeps rel=canonical honest.
location / {
proxy_pass http://127.0.0.1:3700;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
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
# 2 GiB upper cap; the paywall (free below 100 MiB, $1/USD per
# 100 MiB above) is the real size gate. Matches the service's own
# cap in uploads.js.
client_max_body_size 2g;
proxy_request_buffering off;
proxy_buffering off;
proxy_read_timeout 120s;
}
}