Add port and drop ssh:// from user side
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-09-23 09:31:36 +02:00
parent 13b37ce16d
commit 7c11311f02
2 changed files with 10 additions and 6 deletions

View File

@ -1,22 +1,24 @@
#!/bin/sh
PLUGIN_PORT=${PLUGIN_PORT:-22}
PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
load_deploy_key() {
mkdir -p "$HOME/.ssh/"
ssh-keyscan "$PLUGIN_HOST" > "$HOME/.ssh/known_hosts"
ssh-keyscan -p "$PLUGIN_PORT" "$PLUGIN_HOST" > "$HOME/.ssh/known_hosts"
eval `ssh-agent`
echo "$PLUGIN_DEPLOY_KEY" | ssh-add -
}
run_stack_deploy() {
PLUGIN_COMPOSE=${PLUGIN_COMPOSE:-compose.yml}
echo "--- start docker info ---"
docker version
echo "--- end docker info ---"
docker -H "$PLUGIN_HOST" stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
docker \
-H "ssh://$PLUGIN_HOST:$PLUGIN_PORT" \
stack deploy -c "$PLUGIN_COMPOSE" "$PLUGIN_STACK"
}
run_plugin() {