From d6a4608a4f34f8ba7722b4df2d5ad76d4ab38244 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 5 Mar 2022 19:09:56 +0100 Subject: build(docker): allow user to pass stack deploy options With a private registry, the --with-registry-auth option can be necessary. --- bin/deploy.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/deploy.sh b/bin/deploy.sh index 31b8cdb..b843b97 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -14,14 +14,18 @@ loadenvs() { error() { printf "Error: stack name not defined.\n" - printf "Usage: sh deploy.sh your-stack-name\n" + printf "Usage: sh deploy.sh your-stack-name [OPTIONS]\n" exit 1 } deploy() { - [ $# -ne 1 ] && error + [ $# -eq 0 ] && error + + _stack_name="$1" + shift + loadenvs - docker stack deploy -c docker-compose.yml "$1" + docker stack deploy -c docker-compose.yml "$@" "$_stack_name" } deploy "$@" -- cgit v1.2.3