Handle multiple compose files

This commit is contained in:
3wc 2023-01-20 22:47:48 -08:00
parent 7b20ae5196
commit 91f6cba3e9
1 changed files with 3 additions and 4 deletions

View File

@ -64,15 +64,14 @@ output_versions(){
run_stack_deploy() {
echo "--- start deploy ---"
if [[ ! -z "${PLUGIN_REG_USER}" ]] && [[ ! -z "${PLUGIN_REG_PASS}" ]]; then
if [[ -n "${PLUGIN_REG_USER}" ]] && [[ -n "${PLUGIN_REG_PASS}" ]]; then
echo "--- discovered secrets, assuming private registry, logging in ---"
docker -H "$REMOTE_DOCKER_HOST" login -u "${PLUGIN_REG_USER}" -p "${PLUGIN_REG_PASS}"
docker -H "$REMOTE_DOCKER_HOST" pull "${PLUGIN_IMAGE}"
echo "${PLUGIN_IMAGE}"
docker -H "$REMOTE_DOCKER_HOST" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
else
docker -H "$REMOTE_DOCKER_HOST" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
fi
# shellcheck disable=SC2086
docker -H "$REMOTE_DOCKER_HOST" stack deploy -c ${PLUGIN_COMPOSE//:/ -c } "$PLUGIN_STACK"
echo "--- end deploy ---"
}