Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m13s
CI/CD Pipeline / Security Scanning (push) Successful in 2m30s
CI/CD Pipeline / Lint and Format (push) Failing after 45s
CI/CD Pipeline / Terraform Validation (push) Failing after 26s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 28s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 39s
HYBX OMNL TypeScript & anchor / token-aggregation build + reconcile artifact (push) Failing after 21s
Validation / validate-genesis (push) Successful in 30s
Validation / validate-terraform (push) Failing after 25s
Validation / validate-kubernetes (push) Failing after 13s
Validation / validate-smart-contracts (push) Failing after 16s
Validation / validate-security (push) Failing after 1m28s
Validation / validate-documentation (push) Failing after 19s
Verify Deployment / Verify Deployment (push) Failing after 53s
Ship Z Chain slot, International Z Wallet routes, in-app Z Bot APIs, Besu bootstrap, and local/production deployment tooling for digital.omdnl.org. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.4 KiB
Bash
48 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
# Install nginx vhosts for OMNL production domains
|
|
set -euo pipefail
|
|
|
|
REPO_DIR="${OMNL_BANK_ROOT:-$HOME/smom-dbis-138}"
|
|
SNIPPET_SRC="$REPO_DIR/deploy/nginx/omnl-common-locations.conf"
|
|
VHOST_SRC="$REPO_DIR/deploy/nginx/omnl-domains.conf"
|
|
SNIPPET_DST="/etc/nginx/snippets/omnl-common-locations.conf"
|
|
VHOST_DST="/etc/nginx/sites-available/omnl-domains"
|
|
VHOST_LINK="/etc/nginx/sites-enabled/omnl-domains"
|
|
|
|
log() { echo "[$(date -Iseconds)] $*"; }
|
|
|
|
if [ ! -f "$SNIPPET_SRC" ] || [ ! -f "$VHOST_SRC" ]; then
|
|
echo "Missing nginx configs under $REPO_DIR/deploy/nginx" >&2
|
|
exit 1
|
|
fi
|
|
|
|
log "Installing nginx snippet + vhosts..."
|
|
sudo mkdir -p /etc/nginx/snippets
|
|
sudo cp "$SNIPPET_SRC" "$SNIPPET_DST"
|
|
sudo cp "$VHOST_SRC" "$VHOST_DST"
|
|
sudo ln -sf "$VHOST_DST" "$VHOST_LINK"
|
|
|
|
log "Testing nginx configuration..."
|
|
sudo nginx -t
|
|
|
|
log "Reloading nginx..."
|
|
sudo systemctl reload nginx
|
|
|
|
log "Verifying local routes (Host header)..."
|
|
check_host() {
|
|
local host="$1"
|
|
local expect="$2"
|
|
local code
|
|
code=$(curl -s -o /dev/null -w '%{http_code}' -H "Host: $host" "http://127.0.0.1/")
|
|
log " $host -> HTTP $code (expect redirect to $expect)"
|
|
}
|
|
|
|
check_host exchange.omdnl.org /trade
|
|
check_host secure.d-bis.org /central-bank
|
|
check_host office24.omdnl.org /office-24
|
|
check_host digital.omdnl.org /swap
|
|
check_host digital.omdnl.org /z
|
|
|
|
log "OMNL domain deploy complete"
|
|
log "DNS: point all domains A record to 76.53.10.34 (or Cloudflare proxy to origin)"
|