fix(deploy): run Z API on port 3100 in production to avoid Gitea conflict
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 1m14s
CI/CD Pipeline / Security Scanning (push) Successful in 2m27s
CI/CD Pipeline / Lint and Format (push) Failing after 45s
CI/CD Pipeline / Terraform Validation (push) Failing after 22s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 25s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 37s
Validation / validate-genesis (push) Successful in 28s
Validation / validate-terraform (push) Failing after 25s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 11s
Validation / validate-security (push) Failing after 1m16s
Validation / validate-documentation (push) Failing after 18s
Verify Deployment / Verify Deployment (push) Failing after 55s

Production server binds Gitea on :3000, so token-aggregation now uses
:3100 with a dedicated production env profile and nginx upstream.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 07:41:20 -07:00
parent a2db92f3cb
commit 1cce8ed08f
4 changed files with 33 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ REPO_DIR="${Z_ECOSYSTEM_ROOT:-$HOME/smom-dbis-138}"
LOG_DIR="${Z_ECOSYSTEM_LOG_DIR:-$HOME/z-ecosystem/logs}"
ENV_FILE="${Z_ECOSYSTEM_ENV:-$REPO_DIR/config/z-ecosystem.local.env}"
FRONTEND_PORT="${Z_ECOSYSTEM_FRONTEND_PORT:-3002}"
API_PORT="${Z_TOKEN_AGGREGATION_PORT:-${PORT:-3000}}"
log() { echo "[$(date -Iseconds)] $*"; }
@@ -69,7 +70,8 @@ start_svc() {
SETTLEMENT_MIDDLEWARE_CONFIG="$SETTLEMENT_MIDDLEWARE_CONFIG" \
OMNL_SUPPORTED_CHAINS_CONFIG="$OMNL_SUPPORTED_CHAINS_CONFIG" \
Z_SUPPORTED_CHAINS_CONFIG="$OMNL_SUPPORTED_CHAINS_CONFIG" \
TOKEN_AGGREGATION_URL="${TOKEN_AGGREGATION_URL:-http://127.0.0.1:3000}" \
PORT="$port" \
TOKEN_AGGREGATION_URL="${TOKEN_AGGREGATION_URL:-http://127.0.0.1:$port}" \
CHAIN_900002_RPC_URL="$CHAIN_900002_RPC_URL" \
AZURE_OPENAI_ENDPOINT="${AZURE_OPENAI_ENDPOINT:-}" \
AZURE_OPENAI_API_KEY="${AZURE_OPENAI_API_KEY:-}" \
@@ -79,7 +81,7 @@ start_svc() {
echo $! >"$LOG_DIR/$name.pid"
}
start_svc token-aggregation services/token-aggregation 3000 "npm run start"
start_svc token-aggregation services/token-aggregation "$API_PORT" "npm run start"
sleep 2
start_svc settlement-middleware services/settlement-middleware 3011 "npm run start"
sleep 2
@@ -93,7 +95,7 @@ echo $! >"$LOG_DIR/frontend.pid"
sleep 5
log "Z health checks..."
curl -sf "http://127.0.0.1:3000/api/v1/z-bot/health" | head -c 200 || true
curl -sf "http://127.0.0.1:$API_PORT/api/v1/z-bot/health" | head -c 200 || true
echo
curl -sf "http://127.0.0.1:3011/api/v1/settlement/health" | head -c 200 || true
echo