Commit 14611c1e authored by Your Name's avatar Your Name
parents e607c3eb d1222dfc
...@@ -4,6 +4,11 @@ set -e ...@@ -4,6 +4,11 @@ set -e
N=${1:-1} N=${1:-1}
for i in $(seq 1 $N)
do
rm -rfv ./data/net$i
done
composefile="docker-compose-net.yml" composefile="docker-compose-net.yml"
...@@ -24,7 +29,7 @@ for i in $(seq 1 $N) ...@@ -24,7 +29,7 @@ for i in $(seq 1 $N)
do do
echo " net$i:" >> $composefile echo " net$i:" >> $composefile
echo " image: 192.168.1.220:5000/metanet:v0.0.1" >> $composefile echo " image: 192.168.1.220:5000/metanet:v0.0.1" >> $composefile
echo " container_name: net$i" >> $composefile echo " container_name: net$i" >> $composefile
if [ $i -eq 1 ]; then if [ $i -eq 1 ]; then
echo " entrypoint: /root/MetaNet --single-node --enable-prom --log-level debug --p2p-priv-key /root/default-priv-key --grpc-host 0.0.0.0 --grpc-port 38010 --p2p-host-ip 172.99.1.1" >> $composefile echo " entrypoint: /root/MetaNet --single-node --enable-prom --log-level debug --p2p-priv-key /root/default-priv-key --grpc-host 0.0.0.0 --grpc-port 38010 --p2p-host-ip 172.99.1.1" >> $composefile
...@@ -35,7 +40,7 @@ echo "$deploy" >> $composefile ...@@ -35,7 +40,7 @@ echo "$deploy" >> $composefile
echo " ports:" >> $composefile echo " ports:" >> $composefile
echo " - \"$((38010 + i)):38010\"" >> $composefile echo " - \"$((38010 + i)):38010\"" >> $composefile
echo " volumes:" >> $composefile echo " volumes:" >> $composefile
echo " - ./data/net$i:/root/data" >> $composefile echo " - ./data/net$i:/root/data" >> $composefile
echo " networks:" >> $composefile echo " networks:" >> $composefile
echo " meta:" >> $composefile echo " meta:" >> $composefile
echo " ipv4_address: 172.99.1.$i" >> $composefile echo " ipv4_address: 172.99.1.$i" >> $composefile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment