diff --git a/backend/services/deploy-mining.sh b/backend/services/deploy-mining.sh index b1f34862..084024d9 100755 --- a/backend/services/deploy-mining.sh +++ b/backend/services/deploy-mining.sh @@ -271,6 +271,8 @@ load_env() { export KAFKA_BROKERS="${KAFKA_BROKERS:-192.168.1.111:9093}" export REDIS_HOST="${REDIS_HOST:-redis-2}" export RWA_NETWORK_NAME="rwa-2-network" + # Debezium outbox connector 连接的数据库主机名 (standalone 用 postgres-2) + export DEBEZIUM_DB_HOST="postgres-2" # MPC system 在 1.0 服务器上 export MPC_ACCOUNT_SERVICE_URL="${MPC_ACCOUNT_SERVICE_URL:-http://192.168.1.111:4000}" diff --git a/backend/services/scripts/debezium/auth-outbox-connector.json b/backend/services/scripts/debezium/auth-outbox-connector.json index 5cfa7888..0fa95a94 100644 --- a/backend/services/scripts/debezium/auth-outbox-connector.json +++ b/backend/services/scripts/debezium/auth-outbox-connector.json @@ -4,10 +4,10 @@ "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "tasks.max": "1", - "database.hostname": "postgres", + "database.hostname": "${DEBEZIUM_DB_HOST:-postgres}", "database.port": "5432", - "database.user": "rwa_user", - "database.password": "your_secure_password_here", + "database.user": "${POSTGRES_USER:-rwa_user}", + "database.password": "${POSTGRES_PASSWORD:-your_secure_password_here}", "database.dbname": "rwa_auth", "topic.prefix": "cdc.auth", diff --git a/backend/services/scripts/debezium/contribution-outbox-connector.json b/backend/services/scripts/debezium/contribution-outbox-connector.json index f3ba6b77..c154d66f 100644 --- a/backend/services/scripts/debezium/contribution-outbox-connector.json +++ b/backend/services/scripts/debezium/contribution-outbox-connector.json @@ -4,10 +4,10 @@ "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "tasks.max": "1", - "database.hostname": "postgres", + "database.hostname": "${DEBEZIUM_DB_HOST:-postgres}", "database.port": "5432", - "database.user": "rwa_user", - "database.password": "your_secure_password_here", + "database.user": "${POSTGRES_USER:-rwa_user}", + "database.password": "${POSTGRES_PASSWORD:-your_secure_password_here}", "database.dbname": "rwa_contribution", "topic.prefix": "cdc.contribution", diff --git a/backend/services/scripts/debezium/mining-outbox-connector.json b/backend/services/scripts/debezium/mining-outbox-connector.json index d8f521e0..20b5e502 100644 --- a/backend/services/scripts/debezium/mining-outbox-connector.json +++ b/backend/services/scripts/debezium/mining-outbox-connector.json @@ -4,10 +4,10 @@ "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "tasks.max": "1", - "database.hostname": "postgres", + "database.hostname": "${DEBEZIUM_DB_HOST:-postgres}", "database.port": "5432", - "database.user": "rwa_user", - "database.password": "your_secure_password_here", + "database.user": "${POSTGRES_USER:-rwa_user}", + "database.password": "${POSTGRES_PASSWORD:-your_secure_password_here}", "database.dbname": "rwa_mining", "topic.prefix": "cdc.mining", diff --git a/backend/services/scripts/debezium/mining-wallet-outbox-connector.json b/backend/services/scripts/debezium/mining-wallet-outbox-connector.json index 52b04f92..406885d8 100644 --- a/backend/services/scripts/debezium/mining-wallet-outbox-connector.json +++ b/backend/services/scripts/debezium/mining-wallet-outbox-connector.json @@ -4,10 +4,10 @@ "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "tasks.max": "1", - "database.hostname": "postgres", + "database.hostname": "${DEBEZIUM_DB_HOST:-postgres}", "database.port": "5432", - "database.user": "rwa_user", - "database.password": "your_secure_password_here", + "database.user": "${POSTGRES_USER:-rwa_user}", + "database.password": "${POSTGRES_PASSWORD:-your_secure_password_here}", "database.dbname": "rwa_mining_wallet", "topic.prefix": "cdc.mining-wallet", diff --git a/backend/services/scripts/debezium/trading-outbox-connector.json b/backend/services/scripts/debezium/trading-outbox-connector.json index 47f4a5ee..316ee8d7 100644 --- a/backend/services/scripts/debezium/trading-outbox-connector.json +++ b/backend/services/scripts/debezium/trading-outbox-connector.json @@ -4,10 +4,10 @@ "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "tasks.max": "1", - "database.hostname": "postgres", + "database.hostname": "${DEBEZIUM_DB_HOST:-postgres}", "database.port": "5432", - "database.user": "rwa_user", - "database.password": "your_secure_password_here", + "database.user": "${POSTGRES_USER:-rwa_user}", + "database.password": "${POSTGRES_PASSWORD:-your_secure_password_here}", "database.dbname": "rwa_trading", "topic.prefix": "cdc.trading",