Something went wrong. Try again.
Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol.
Something went wrong. Try again.
942 B · 25 lines
Python
1234567891011121314151617181920212223242526#!/usr/bin/env python3"""Validate rendered logging settings without printing Compose credentials."""
import jsonimport sys
APPS = ("wisp-place", "wisp-hosting-service", "wisp-firehose-service")URLS = ("http://valefar.mesh.wisp.place:9428", "https://logs.nekomimi.pet")
def verify(config): problems = [] for name in APPS: environment = config.get("services", {}).get(name, {}).get("environment", {}) if environment.get("GRAFANA_LOKI_URL") not in URLS: problems.append(f"{name}: missing or unexpected GRAFANA_LOKI_URL") if environment.get("GRAFANA_LOKI_PATH") != "/insert/loki/api/v1/push": problems.append(f"{name}: missing or unexpected GRAFANA_LOKI_PATH") return problems
if __name__ == "__main__": problems = verify(json.load(sys.stdin)) print("\n".join(problems) if problems else "all production apps retain log ingestion settings") sys.exit(bool(problems))