Publishers no longer need external hosting at all. The service runs its own s3d (SiaFoundation gateway) as a Docker sidecar on the internal compose network; scan-clean uploads land there via PUT; readers fetch through /dl/<sha256> on prometheus.x which proxies back out from s3d. - deploy/docker-compose.yml: s3d service added. Image is ghcr.io/siafoundation/s3d:latest, data folder bind-mounted at ./s3d-data/ so the operator can seed it from a Pithos connection export. Only prometheus-internal network — never public. - deploy/setup-s3d.sh: one-time import of the Pithos connection tarball, writes a fresh s3d.yml with a random adminPassword, mints an S3 access key for the Prometheus service, appends PROMETHEUS_S3_* lines to .env. Idempotent on re-run. - service/storage.js: endpoint now defaults to the internal s3d (http://s3d:8000); publicBase defaults to https://prometheus.x so download URLs flow through the service's own /dl handler. Bucket is auto-created on first use so a fresh data folder bootstraps. Added getObjectStream() for the read side. - service/downloads.js: GET/HEAD /dl/<sha256> — forwards Range, content-type and content-length from s3d, drops s3d-specific headers (x-amz-*), sets immutable long-cache. Hash is validated against ^[0-9a-f]{64}$ before touching upstream. - service/server.js: route table wires /dl/* to the handler above. |
||
|---|---|---|
| deploy | ||
| public | ||
| scripts | ||
| service | ||
| .gitignore | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Prometheus
The service behind prometheus.x — a standalone website that accepts app
listings, scans the binaries, generates APS1 records for publishers to sign,
and serves the browse pages.
The architecture decisions and the reasoning behind them live at
_coordination/sessions/prometheus-x-architecture.md.
Read that before touching the code; it answers the questions this directory
otherwise invites ("why isn't this on Sia?", "why isn't the admin on another
subdomain?", "why Node?").
service/ Node HTTP server, templates, scanner, storage, payments
public/ Static assets served under /static/
content/ Prose content in a form the templates render into pages
Run it locally
cd Prometheus
npm install # none yet; placeholder for when deps show up
node service/server.js
Opens on http://127.0.0.1:3700 by default. Override with PORT=xxxx.
Layout
The server is one node:http listener behind a trivial map-based router.
Pages are plain functions that return {title, description, body} and
layout() wraps them in the common document shell. Static files under
public/ are served directly.
There's no framework and no templating engine on purpose — a site this small does not earn a dependency surface, and the response-rendering path is short enough to read at a glance.