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
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:
25
config/z-ecosystem.production.env.example
Normal file
25
config/z-ecosystem.production.env.example
Normal file
@@ -0,0 +1,25 @@
|
||||
# Z Ecosystem production — copy to config/z-ecosystem.production.env
|
||||
# Gitea binds :3000 on dev-bis-ali; Z API uses :3100
|
||||
|
||||
VITE_ECOSYSTEM=z
|
||||
Z_SUPPORTED_CHAINS_CONFIG=config/z-supported-chains.v1.json
|
||||
Z_ECOSYSTEM_PUBLIC_URL=https://zblockchainsystem.com
|
||||
VITE_Z_ECOSYSTEM_URL=https://zblockchainsystem.com
|
||||
|
||||
CHAIN_900002_RPC_URL=https://rpc.zblockchainsystem.com
|
||||
VITE_RPC_URL_900002=https://rpc.zblockchainsystem.com
|
||||
VITE_Z_CHAIN_EXPLORER_URL=https://explorer.zblockchainsystem.com
|
||||
VITE_ENABLE_Z_WALLET=true
|
||||
|
||||
Z_TOKEN_AGGREGATION_PORT=3100
|
||||
PORT=3100
|
||||
TOKEN_AGGREGATION_URL=http://127.0.0.1:3100
|
||||
SETTLEMENT_MIDDLEWARE_URL=http://127.0.0.1:3011
|
||||
SETTLEMENT_URL=http://127.0.0.1:3011
|
||||
SETTLEMENT_MIDDLEWARE_CONFIG=config/settlement-middleware.production.v1.json
|
||||
|
||||
# Z Bot — Azure OpenAI (optional)
|
||||
AZURE_OPENAI_ENDPOINT=
|
||||
AZURE_OPENAI_API_KEY=
|
||||
AZURE_OPENAI_DEPLOYMENT=gpt-4o-mini
|
||||
AZURE_OPENAI_API_VERSION=2024-02-15-preview
|
||||
@@ -7,7 +7,7 @@ upstream z_ecosystem_frontend {
|
||||
}
|
||||
|
||||
upstream z_ecosystem_api {
|
||||
server 127.0.0.1:3000;
|
||||
server 127.0.0.1:3100;
|
||||
}
|
||||
|
||||
upstream z_ecosystem_settlement {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
ENV_FILE="${Z_ECOSYSTEM_ENV:-$ROOT/config/z-ecosystem.local.env}"
|
||||
ENV_FILE="${Z_ECOSYSTEM_ENV:-$ROOT/config/z-ecosystem.production.env}"
|
||||
PROD_CFG="$ROOT/config/z-chain-production.v1.json"
|
||||
DOMAIN_CFG="$ROOT/config/z-ecosystem-production-domains.v1.json"
|
||||
|
||||
@@ -64,7 +64,7 @@ if [[ "${Z_ECOSYSTEM_PUSH_PCT:-0}" == "1" ]]; then
|
||||
fi
|
||||
|
||||
log "Done. Verify:"
|
||||
log " curl -sf http://127.0.0.1:3000/api/v1/z-bot/health"
|
||||
log " curl -sf http://127.0.0.1:\${Z_TOKEN_AGGREGATION_PORT:-3100}/api/v1/z-bot/health"
|
||||
log " curl -sf http://127.0.0.1:3011/api/v1/settlement/health"
|
||||
log " curl -sI https://zblockchainsystem.com/z"
|
||||
log " bash scripts/deployment/print-z-dns-records.sh"
|
||||
|
||||
Reference in New Issue
Block a user