#!/usr/bin/env bash
# Print Cloudflare/registrar DNS records for OMNL production domains.
# Origin server: dev-bis-ali @ 76.53.10.34 (nginx vhosts already deployed)

ORIGIN_IP="${OMNL_ORIGIN_IP:-76.53.10.34}"
PROXY="${OMNL_DNS_PROXY:-proxied}"

cat <<EOF
# OMNL production DNS — add these records in Cloudflare (or your registrar)
# Origin IP: $ORIGIN_IP
# Proxy: orange-cloud ON (recommended) for HTTPS at the edge

Zone: omdnl.org
  Type  Name      Content         Proxy   Dashboard
  A     exchange  $ORIGIN_IP      yes     DBIS Trade (/trade)
  A     secure    $ORIGIN_IP      yes     Central Bank (/central-bank)
  A     online    $ORIGIN_IP      yes     Online banking (/central-bank)
  A     forex     $ORIGIN_IP      yes     Forex terminal (/trade)
  A     digital   $ORIGIN_IP      yes     Digital swap (/swap)

Zone: omdnl.org (Office 24)
  Type  Name      Content         Proxy   Dashboard
  A     office24  $ORIGIN_IP      yes     Office 24 (/office-24)

Zone: d-bis.org
  Type  Name      Content         Proxy   Notes
  A     exchange  $ORIGIN_IP      yes     DBIS Trade (/trade)
  A     secure    $ORIGIN_IP      yes     UPDATE — currently 76.53.10.36
  A     forex     $ORIGIN_IP      yes     Forex terminal (/trade)

# Cloudflare SSL/TLS mode: Full (origin is HTTP on :80)
# After DNS propagates (1–15 min), verify:
#   curl -sI https://exchange.omdnl.org/ | head -3
#   curl -sI https://office24.omdnl.org/ | head -3
#   curl -sI https://secure.d-bis.org/ | head -3

Live URLs once DNS is active:
  https://exchange.omdnl.org/trade
  https://secure.omdnl.org/central-bank
  https://online.omdnl.org/central-bank
  https://forex.omdnl.org/trade
  https://digital.omdnl.org/swap
  https://office24.omdnl.org/office-24
  https://exchange.d-bis.org/trade
  https://secure.d-bis.org/central-bank
  https://forex.d-bis.org/trade
EOF
