fix: nginx API proxy inside banking portal LXCs
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m20s
CI/CD Pipeline / Security Scanning (push) Successful in 2m35s
CI/CD Pipeline / Lint and Format (push) Failing after 53s
CI/CD Pipeline / Terraform Validation (push) Failing after 27s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 26s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 42s
Validation / validate-genesis (push) Successful in 28s
Validation / validate-terraform (push) Failing after 25s
Validation / validate-kubernetes (push) Failing after 9s
Validation / validate-smart-contracts (push) Failing after 9s
Validation / validate-security (push) Failing after 1m16s
Validation / validate-documentation (push) Failing after 23s
Verify Deployment / Verify Deployment (push) Failing after 57s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-28 19:48:00 -07:00
parent b17df7ef14
commit d182a1d624
3 changed files with 94 additions and 6 deletions

View File

@@ -54,7 +54,8 @@ tar -czf "$STAGE" \
services/dbis-exchange/dist \
services/dbis-exchange/package.json \
services/dbis-exchange/package-lock.json \
scripts/deployment/start-omnl-banking-portal.sh
scripts/deployment/start-omnl-banking-portal.sh \
deploy/nginx/omnl-lxc-portal.conf
log "Push to PVE host ${OMNL_PVE_SSH_TARGET}..."
omnl_pve_scp "$STAGE" "${OMNL_PVE_SSH_TARGET}:/tmp/omnl-portal.tar.gz"

View File

@@ -1,9 +1,10 @@
#!/usr/bin/env bash
# Start OMNL services from /srv/banking-portal/OMNL inside PCT
# Start OMNL services from /srv/ali-portal inside PCT
set -euo pipefail
ROOT="${OMNL_PORTAL_ROOT:-/srv/ali-portal}"
LOG_DIR="${OMNL_BANK_LOG_DIR:-/var/log/omnl-bank}"
NGINX_TEMPLATE="${ROOT}/deploy/nginx/omnl-lxc-portal.conf"
mkdir -p "$LOG_DIR"
export SETTLEMENT_MIDDLEWARE_CONFIG="${ROOT}/config/settlement-middleware.production.v1.json"
@@ -24,6 +25,7 @@ start() {
OMNL_FINERACT_BASE_URL="${OMNL_FINERACT_BASE_URL:-}" \
OMNL_FINERACT_TENANT="${OMNL_FINERACT_TENANT:-omnl}" \
OMNL_FINERACT_USERNAME="${OMNL_FINERACT_USERNAME:-}" \
OMNL_FINERACT_USER="${OMNL_FINERACT_USER:-}" \
OMNL_FINERACT_PASSWORD="${OMNL_FINERACT_PASSWORD:-}" \
OMNL_PUBLIC_MONEY_SUPPLY="${OMNL_PUBLIC_MONEY_SUPPLY:-1}" \
bash -c "$cmd" >"${LOG_DIR}/${name}.log" 2>&1 &
@@ -39,8 +41,21 @@ sleep 2
FRONTEND_PORT="${OMNL_BANK_FRONTEND_PORT:-3002}"
pkill -f "serve -s.*${FRONTEND_PORT}" 2>/dev/null || true
cd "${ROOT}/frontend-dapp"
nohup npx --yes serve -s dist -l "$FRONTEND_PORT" >"${LOG_DIR}/frontend.log" 2>&1 &
echo $! >"${LOG_DIR}/frontend.pid"
if [ -f "${LOG_DIR}/nginx.pid" ]; then
nginx -s quit -g "pid ${LOG_DIR}/nginx.pid;" 2>/dev/null || true
fi
fuser -k "${FRONTEND_PORT}/tcp" 2>/dev/null || true
sleep 1
echo "OMNL banking portal started under ${ROOT}"
if command -v nginx >/dev/null 2>&1 && [ -f "$NGINX_TEMPLATE" ]; then
sed "s|/srv/ali-portal|${ROOT}|g" "$NGINX_TEMPLATE" > "${LOG_DIR}/nginx.conf"
nginx -t -c "${LOG_DIR}/nginx.conf"
nohup nginx -c "${LOG_DIR}/nginx.conf" >"${LOG_DIR}/frontend.log" 2>&1 &
echo $! >"${LOG_DIR}/frontend.pid"
echo "OMNL banking portal started under ${ROOT} (nginx :${FRONTEND_PORT})"
else
cd "${ROOT}/frontend-dapp"
nohup npx --yes serve -s dist -l "$FRONTEND_PORT" >"${LOG_DIR}/frontend.log" 2>&1 &
echo $! >"${LOG_DIR}/frontend.pid"
echo "OMNL banking portal started under ${ROOT} (serve :${FRONTEND_PORT})"
fi