You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
322 B
15 lines
322 B
7 years ago
|
#!/bin/bash -e
|
||
|
|
||
|
for f in $*; do
|
||
|
f=${f%.yaml}
|
||
|
if ! test -e ${f}.yaml; then
|
||
|
echo "ERROR: no file ${f}.yaml" 1>&2
|
||
|
exit 1
|
||
|
fi
|
||
|
echo "... deploying $f"
|
||
|
for d in $(sed -n 's/^ *source: *//p' ${f}.yaml); do
|
||
|
test -e $d || mkdir -p $d
|
||
|
done
|
||
|
docker stack deploy --compose-file ${f}.yaml ${f}
|
||
|
done
|