2026-10-09 00:47:40 +02:00
|
|
|
# Standalone compose for prometheus.x on the Hephaestus VPS.
|
|
|
|
|
#
|
|
|
|
|
# The service attaches to Hephaestus's existing docker network
|
|
|
|
|
# (hephaestus_default), so Hephaestus's Caddy can route prometheus.x to
|
|
|
|
|
# `prometheus:3700` with no changes to Hephaestus itself other than one new
|
|
|
|
|
# block in its Caddyfile.
|
|
|
|
|
#
|
|
|
|
|
# One volume (`data`) holds the SQLite DB, the service's ed25519 signing
|
|
|
|
|
# key, uploads that passed scan, and the snapshot build output. Env lives
|
|
|
|
|
# in an .env file alongside this one; the ones below are the defaults and
|
|
|
|
|
# can be overridden.
|
|
|
|
|
|
|
|
|
|
name: prometheus
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
prometheus:
|
|
|
|
|
build:
|
|
|
|
|
context: ..
|
|
|
|
|
dockerfile: deploy/Dockerfile
|
|
|
|
|
image: prometheus:latest
|
|
|
|
|
restart: unless-stopped
|
2026-10-09 21:58:56 +02:00
|
|
|
depends_on:
|
|
|
|
|
clamav:
|
|
|
|
|
condition: service_healthy
|
2026-10-09 00:47:40 +02:00
|
|
|
environment:
|
|
|
|
|
BNS_NETWORK: chipnet
|
2026-10-09 21:58:56 +02:00
|
|
|
CLAMD_HOST: clamav
|
|
|
|
|
CLAMD_PORT: "3310"
|
2026-10-09 00:47:40 +02:00
|
|
|
ADMIN_PUBLISHER: ${ADMIN_PUBLISHER:-}
|
|
|
|
|
VIRUSTOTAL_API_KEY: ${VIRUSTOTAL_API_KEY:-}
|
|
|
|
|
PAYMENT_REQUIRED: ${PAYMENT_REQUIRED:-}
|
|
|
|
|
PROMETHEUS_PAYMENT_ADDRESS: ${PROMETHEUS_PAYMENT_ADDRESS:-}
|
|
|
|
|
PROMETHEUS_LISTING_FEE_USD: ${PROMETHEUS_LISTING_FEE_USD:-1}
|
|
|
|
|
BNS_GATEWAY: ${BNS_GATEWAY:-}
|
|
|
|
|
volumes:
|
|
|
|
|
- data:/data
|
|
|
|
|
networks:
|
2026-10-09 21:58:56 +02:00
|
|
|
- prometheus-internal
|
2026-10-09 00:47:40 +02:00
|
|
|
- hephaestus
|
|
|
|
|
expose:
|
|
|
|
|
- "3700"
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "--quiet", "--spider", "http://127.0.0.1:3700/healthz"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 3
|
2026-10-09 21:58:56 +02:00
|
|
|
start_period: 60s
|
|
|
|
|
|
|
|
|
|
# ClamAV runs as a sibling container on an internal network — only
|
|
|
|
|
# Prometheus can reach it. First start downloads ~250 MB of signatures via
|
|
|
|
|
# freshclam into a volume; subsequent starts reuse it.
|
|
|
|
|
clamav:
|
|
|
|
|
image: clamav/clamav:stable
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
CLAMAV_NO_MILTERD: "true"
|
|
|
|
|
volumes:
|
|
|
|
|
- clamav-sigs:/var/lib/clamav
|
|
|
|
|
networks:
|
|
|
|
|
- prometheus-internal
|
|
|
|
|
expose:
|
|
|
|
|
- "3310"
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "clamdcheck.sh || clamdscan --ping 2>/dev/null || exit 1"]
|
|
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 10
|
|
|
|
|
# Signature download on first start can take a few minutes.
|
|
|
|
|
start_period: 5m
|
2026-10-09 00:47:40 +02:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
data:
|
2026-10-09 21:58:56 +02:00
|
|
|
clamav-sigs:
|
2026-10-09 00:47:40 +02:00
|
|
|
|
|
|
|
|
networks:
|
2026-10-09 21:58:56 +02:00
|
|
|
# Internal: only Prometheus + clamav. Clamd never exposed off this network.
|
|
|
|
|
prometheus-internal:
|
|
|
|
|
driver: bridge
|
|
|
|
|
# External: shared with Hephaestus so its Caddy can route prometheus.x.
|
2026-10-09 00:47:40 +02:00
|
|
|
hephaestus:
|
|
|
|
|
external: true
|
|
|
|
|
name: hephaestus_default
|