forked from elhmn/ac-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_stack.sh
32 lines (26 loc) · 1.11 KB
/
deploy_stack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ************************************************************************** #
# #
# deploy_stack.sh #
# #
# By: elhmn <www.elhmn.com> #
# <[email protected]> #
# #
# Created: Sun Aug 26 08:30:08 2018 by elhmn #
# Updated: Sun Aug 26 09:11:43 2018 by bmbarga #
# #
# ************************************************************************** #
#!/bin/sh
# Usage :
# ./script.sh stackName composeFile
deployStack()
{
stackName=ac_lab
composeFile=docker-compose.yml
if [ ! -z "$1" ]; then
stackName=$1
fi
if [ ! -z "$2" ]; then
composeFile=$2
fi
docker stack deploy -c $composeFile $stackName
}