aboutsummaryrefslogtreecommitdiffstats
path: root/bin/deploy.sh
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-03-05 19:09:56 +0100
committerArmand Philippot <git@armandphilippot.com>2022-03-05 19:09:56 +0100
commitd6a4608a4f34f8ba7722b4df2d5ad76d4ab38244 (patch)
treefe0ce900d310a2a3e735bc6801153cd110a2a1e8 /bin/deploy.sh
parent2ce74ce3d489a1675caafcbb5d74488de0c4e3ea (diff)
build(docker): allow user to pass stack deploy options
With a private registry, the --with-registry-auth option can be necessary.
Diffstat (limited to 'bin/deploy.sh')
-rwxr-xr-xbin/deploy.sh10
1 files 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 "$@"