Skip to content

Commit 3038285

Browse files
committed
update
1 parent 24d2805 commit 3038285

2 files changed

Lines changed: 23 additions & 6 deletions

File tree

container-manager/src/gen/gen_xdpos.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ for (let i = 1; i <= config.num_machines; i++) {
4848
});
4949
}
5050

51+
doc["services"]["bootnode"] = {
52+
image: `xinfinorg/xdcsubnets:${config.version.bootnode}`,
53+
restart: "always",
54+
volumes: ["./bootnodes:/work/bootnodes"],
55+
entrypoint: ["bash", "/work/start-bootnode.sh"],
56+
command: ["-verbosity", "6", "-nodekey", "bootnode.key"],
57+
ports: ["20301:20301/tcp", "20301:20301/udp"],
58+
environment: ["BOOTNODE_PORT=20301"],
59+
profiles: ["machine1"],
60+
};
61+
62+
5163
// checkpoint smartcontract deployment config
5264
doc, (ip_record = gen_compose.injectNetworkConfig(doc));
5365
subnetconf = [];
@@ -151,11 +163,11 @@ function copyScripts(output_dir) {
151163
);
152164
fs.copyFileSync(
153165
`${__dirname}/scripts/docker-up.sh`,
154-
`${output_dir}/scripts/docker-up.sh`
166+
`${output_dir}/docker-up.sh`
155167
);
156168
fs.copyFileSync(
157169
`${__dirname}/scripts/docker-down.sh`,
158-
`${output_dir}/scripts/docker-down.sh`
170+
`${output_dir}/docker-down.sh`
159171
);
160172
}
161173

container-manager/src/gen/scripts/docker-up.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ if [[ -z $1 ]]; then
66
echo "Missing argument"
77
echo "Usage: docker-up.sh PROFILE"
88
echo "Profile:"
9-
echo " machine1 - subnet nodes"
10-
echo " services - relayer, backend, frontend"
9+
echo " machine1"
1110
exit
1211
fi
1312

14-
docker compose --env-file --profile $1 pull
15-
docker compose --env-file --profile $1 up -d
13+
which docker-compose
14+
if [[ $? != 0 ]]; then
15+
shopt -s expand_aliases
16+
alias docker-compose='docker compose'
17+
fi
18+
19+
docker-compose --profile $1 pull
20+
docker-compose --profile $1 up -d
1621

0 commit comments

Comments
 (0)