add infrastructure manifests

This commit is contained in:
stackops
2026-04-09 13:26:46 +03:00
parent f896fa3d3e
commit 7fe1376fe6
10 changed files with 358 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
# Load credentials
source "$(dirname "$0")/../../.cloudflare"
IP="82.114.226.118"
for name in "@" "app" "git" "grafana" "prom" "*.app"; do
echo "Creating DNS record: $name -> $IP"
curl -s -X POST "https://api.cloudflare.com/client/v4/zones/${CF_ZONE_ID}/dns_records" \
-H "Authorization: Bearer ${CF_API_TOKEN}" \
-H "Content-Type: application/json" \
--data "{\"type\":\"A\",\"name\":\"${name}\",\"content\":\"${IP}\",\"ttl\":1,\"proxied\":false}" \
| python3 -c "import sys,json; r=json.load(sys.stdin); print(' OK' if r['success'] else f' FAIL: {r[\"errors\"]}')"
done