diff --git a/Vagrantfile b/Vagrantfile index 5ce177c..bfb7f79 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -167,6 +167,18 @@ DOCKERFILE done ufw-docker service allow public_service 80/tcp + + for name in public_multiport; do + webapp="${name}_service" + port_1="23080" + port_2="23443" + if docker service inspect "$webapp" &>/dev/null; then docker service rm "$webapp"; fi + docker service create --name "$webapp" \ + -p "${port_1}:80" -p "${port_2}:443" --env name="$webapp" --replicas 3 #{private_registry}/chaifeng/hostname-webapp + done + + ufw-docker service allow public_multiport 443/tcp + ufw-docker service allow public_multiport 80/tcp SHELL end @@ -203,6 +215,9 @@ DOCKERFILE test-webapp "$server:29090" ! test-webapp "$server:9000" + test-webapp "$server:23080" + test-webapp "$server:23443" + echo "=====================" echo " TEST DONE " echo "=====================" diff --git a/test/bach b/test/bach index 452ebfb..447edb6 160000 --- a/test/bach +++ b/test/bach @@ -1 +1 @@ -Subproject commit 452ebfba3e48fa91b8110a8ddb65379f50d11668 +Subproject commit 447edb60db232d3dbc2267f37c49bd7a070cc83d