Skip to content

Commit

Permalink
change default ports
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Sep 22, 2024
1 parent ea94316 commit 8fc5eb3
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 37 deletions.
17 changes: 0 additions & 17 deletions subnet/deployment-generator/docker/start_faucet.sh

This file was deleted.

6 changes: 3 additions & 3 deletions subnet/deployment-generator/scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ docker pull xinfinorg/xdcsubnets:$VERSION_GENESIS


echo ''
echo 'go to http://localhost:3000 to access Subnet Configuration Generator UI'
echo 'go to http://localhost:5210 to access Subnet Configuration Generator UI'
echo 'or use ssh tunnel if this is running on your server'
echo 'ssh -N -L localhost:3000:localhost:3000 <username>@<ip_address> -i <private_key_file>'
echo 'ssh -N -L localhost:5210:localhost:5210 <username>@<ip_address> -i <private_key_file>'
mkdir -p generated/scripts
docker run -p 3000:3000 -v $current_dir/generated:/app/generated xinfinorg/subnet-generator:$VERSION_GENERATOR || gen_success=false
docker run -p 5210:5210 -v $current_dir/generated:/app/generated xinfinorg/subnet-generator:$VERSION_GENERATOR || gen_success=false


echo 'generating genesis.json'
Expand Down
4 changes: 2 additions & 2 deletions subnet/deployment-generator/src/faucet.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@ async function faucetServer(inputs) {

app.use("/", router);

app.listen(process.env.port || 3001);
console.log("Running at Port 3001");
app.listen(process.env.port || 5211);
console.log("Running at Port 5211");
}
6 changes: 3 additions & 3 deletions subnet/deployment-generator/src/gen_compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ function genServices(machine_id) {
restart: "always",
env_file: config_path, // not used directly (injected via volume) but required to trigger restart if common.env changes
volumes: [`${config_path}:/app/.env.local`],
ports: ["5555:5555"],
ports: ["5214:5214"],
profiles: [machine],
};
const relayer = {
image: `xinfinorg/xdc-relayer:${config.version.relayer}`,
restart: "always",
env_file: config_path,
ports: ["4000:4000"],
ports: ["5215:5215"],
profiles: [machine],
};
const stats = {
image: `xinfinorg/subnet-stats-service:${config.version.stats}`,
restart: "always",
env_file: config_path,
volumes: ["./stats-service/logs:/app/logs"],
ports: ["3000:3000"],
ports: ["5213:5213"],
profiles: [machine],
};
const bootnode = genBootNode(machine_id);
Expand Down
8 changes: 4 additions & 4 deletions subnet/deployment-generator/src/gen_env.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ BOOTNODES=enode://cc566d1033f21c7eb0eb9f403bb651f3949b5f63b40683917\
NETWORK_ID=${config.network_id}
SYNC_MODE=full
RPC_API=db,eth,debug,miner,net,shh,txpool,personal,web3,XDPoS
STATS_SERVICE_ADDRESS=${config.ip_1}:3000
STATS_SERVICE_ADDRESS=${config.ip_1}:5213
STATS_SECRET=${config.secret_string}
PORT=${port}
RPCPORT=${rpcport}
Expand All @@ -53,7 +53,7 @@ BOOTNODES=enode://cc566d1033f21c7eb0eb9f403bb651f3949b5f63b40683917\
NETWORK_ID=${config.network_id}
SYNC_MODE=full
RPC_API=db,eth,debug,miner,net,shh,txpool,personal,web3,XDPoS
STATS_SERVICE_ADDRESS=${ip_record["stats"]}:3000
STATS_SERVICE_ADDRESS=${ip_record["stats"]}:5213
STATS_SECRET=${config.secret_string}
PORT=${port}
RPCPORT=${rpcport}
Expand All @@ -80,7 +80,7 @@ SLACK_WEBHOOK=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXX
CORS_ALLOW_ORIGIN=*
# Frontend
VITE_SUBNET_URL=http://${config.public_ip}:3000
VITE_SUBNET_URL=http://${config.public_ip}:5213
VITE_SUBNET_RPC=http://${config.public_ip}:8545
# Share Variable
Expand Down Expand Up @@ -135,7 +135,7 @@ SLACK_WEBHOOK=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXX
CORS_ALLOW_ORIGIN=*
# Frontend
VITE_SUBNET_URL=http://127.0.0.1:3000
VITE_SUBNET_URL=http://127.0.0.1:5213
VITE_SUBNET_RPC=http://127.0.0.1:8545
# Share Variable
Expand Down
12 changes: 6 additions & 6 deletions subnet/deployment-generator/src/gen_other.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function genCommands() {
commands += ` docker compose --env-file docker-compose.env --profile services pull\n`;
commands += ` docker compose --env-file docker-compose.env --profile services up -d\n`;
commands += "\n6. Confirm Subnet services through browser UI\n";
commands += ` Frontend: http://${config.public_ip}:5555\n`;
commands += ` Relayer: http://${config.public_ip}:4000\n`;
commands += ` Frontend: http://${config.public_ip}:5214\n`;
commands += ` Relayer: http://${config.public_ip}:5215\n`;

if (config.zero.zero_mode == "") {
} else if (config.zero.zero_mode == "one-directional") {
Expand Down Expand Up @@ -141,8 +141,8 @@ function genCommands() {
commands += ` docker compose --env-file docker-compose.env --profile services down\n`;
commands += ` docker compose --env-file docker-compose.env --profile services up -d\n`;
commands += "\n5. Confirm Relayer is running \n";
commands += ` Relayer: http://${config.public_ip}:4000\n`;
commands += ` Frontend: http://${config.public_ip}:5555\n`;
commands += ` Relayer: http://${config.public_ip}:5215\n`;
commands += ` Frontend: http://${config.public_ip}:5214\n`;

} else if (config.zero.zero_mode == "bi-directional") {
commands += "\n\nDeploy XDC-Zero crosschain framework (bi-directional)\n";
Expand Down Expand Up @@ -182,8 +182,8 @@ function genCommands() {
commands += ` docker compose --env-file docker-compose.env --profile services down\n`;
commands += ` docker compose --env-file docker-compose.env --profile services up -d\n`;
commands += "\n6. Confirm Relayer is running \n";
commands += ` Relayer: http://${config.public_ip}:4000\n`;
commands += ` Frontend: http://${config.public_ip}:5555\n`;
commands += ` Relayer: http://${config.public_ip}:5215\n`;
commands += ` Frontend: http://${config.public_ip}:5214\n`;
} else {
console.log("Error: Invalid XDC-Zero mode");
exit();
Expand Down
4 changes: 2 additions & 2 deletions subnet/deployment-generator/src/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ router.get("/address", (req,res) => {
})

app.use("/", router);
app.listen(process.env.port || 3000);
app.listen(process.env.port || 5210);

console.log("Running at Port 3000");
console.log("Running at Port 5210");


function callExec(command) {
Expand Down

0 comments on commit 8fc5eb3

Please sign in to comment.