Fix deploy remote script arguments
This commit is contained in:
@@ -109,7 +109,7 @@ scp \
|
||||
"$tarball_path" "$REMOTE_HOST:$remote_tarball_path"
|
||||
|
||||
echo "Building image and restarting container on $REMOTE_HOST..."
|
||||
remote_env_file_escaped="$(printf '%q' "$REMOTE_ENV_FILE")"
|
||||
remote_env_file_arg="${REMOTE_ENV_FILE:-__ROLEMASTERDB_EMPTY__}"
|
||||
ssh \
|
||||
-o ControlPath="$ssh_control_path" \
|
||||
"$REMOTE_HOST" bash -s -- \
|
||||
@@ -121,7 +121,8 @@ ssh \
|
||||
"$HOST_BIND_ADDRESS" \
|
||||
"$HOST_PORT" \
|
||||
"$CONTAINER_PORT" \
|
||||
"$REMOTE_USE_SUDO" <<EOF
|
||||
"$REMOTE_USE_SUDO" \
|
||||
"$remote_env_file_arg" <<'EOF'
|
||||
set -euo pipefail
|
||||
|
||||
release_id="$1"
|
||||
@@ -133,7 +134,11 @@ host_bind_address="$6"
|
||||
host_port="$7"
|
||||
container_port="$8"
|
||||
remote_use_sudo="$9"
|
||||
remote_env_file=$remote_env_file_escaped
|
||||
remote_env_file="${10}"
|
||||
|
||||
if [[ "$remote_env_file" == "__ROLEMASTERDB_EMPTY__" ]]; then
|
||||
remote_env_file=""
|
||||
fi
|
||||
|
||||
release_dir="$remote_app_dir/releases/$release_id"
|
||||
tarball_path="$release_dir/release.tar.gz"
|
||||
|
||||
Reference in New Issue
Block a user