summaryrefslogtreecommitdiff
path: root/docker/spinup.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-11-07 11:35:44 +0200
committerPaul Buetow <paul@buetow.org>2021-11-07 11:35:44 +0200
commit4121a7fc9c24384566760708e2ee7a03de0bd484 (patch)
treefcde680f50d40ec3875206bce8d3b7723f319301 /docker/spinup.sh
parent8de8bb925229368ae8c5f84362c1aed488d1aff5 (diff)
Can configure num of docker server instances via NUM_INSTANCES
Diffstat (limited to 'docker/spinup.sh')
-rwxr-xr-xdocker/spinup.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/spinup.sh b/docker/spinup.sh
index 399d781..d9e5ac3 100755
--- a/docker/spinup.sh
+++ b/docker/spinup.sh
@@ -2,10 +2,14 @@
declare -i NUM_INSTANCES=$1
declare -i BASE_PORT=2222
+declare -r SERVERLIST=serverlist.txt
for (( i=0; i < $NUM_INSTANCES; i++ )); do
port=$[ BASE_PORT + i + 1 ]
name=dserver-serv$i
echo Creating $name
docker run -d --name $name --hostname serv$i -p $port:2222 dserver:develop
+ echo localhost:$port >> $SERVERLIST.tmp
done
+
+mv $SERVERLIST.tmp $SERVERLIST