fix(deploy): export MPC_SERVICE_URL in standalone mode

In standalone mode, mpc-service runs on the 1.0 server (192.168.1.111),
not in the local Docker network. The default docker-compose value
http://mpc-service:3006 won't resolve. Export MPC_SERVICE_URL pointing
to the 1.0 server's IP so mining-blockchain-service can reach it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-01 20:30:44 -08:00
parent 1106a40ff1
commit 3102f3e7fb
1 changed files with 3 additions and 1 deletions

View File

@ -265,11 +265,12 @@ load_env() {
# Mode-specific configuration
if [ "$DEPLOY_MODE" = "standalone" ]; then
# Standalone: local PostgreSQL/Redis, remote Kafka
# Standalone: local PostgreSQL/Redis, remote Kafka/MPC
export POSTGRES_HOST="${POSTGRES_HOST:-postgres-2}"
export POSTGRES_PORT="${POSTGRES_PORT:-5432}"
export KAFKA_BROKERS="${KAFKA_BROKERS:-192.168.1.111:9093}"
export REDIS_HOST="${REDIS_HOST:-redis-2}"
export MPC_SERVICE_URL="${MPC_SERVICE_URL:-http://192.168.1.111:3006}"
export RWA_NETWORK_NAME="rwa-2-network"
POSTGRES_CONTAINER="${POSTGRES_CONTAINER:-rwa-postgres-2}"
@ -1929,6 +1930,7 @@ show_help() {
echo ""
echo -e "${BOLD}Environment Variables (standalone mode):${NC}"
echo " KAFKA_BROKERS Remote Kafka address (default: 192.168.1.111:9093)"
echo " MPC_SERVICE_URL Remote MPC service (default: http://192.168.1.111:3006)"
echo " POSTGRES_HOST PostgreSQL host (default: postgres-2)"
echo " REDIS_HOST Redis host (default: redis-2)"
echo " DEBEZIUM_CONNECT_URL Debezium REST API (default: http://localhost:8084)"