Fix MEV backend and token-aggregation deployment wiring
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 12s
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 12s
This commit is contained in:
@@ -19,6 +19,8 @@ set -euo pipefail
|
||||
|
||||
BUNDLE_ROOT="${1:?Usage: $0 /path/to/token-aggregation-build}"
|
||||
SERVICE_SRC="$BUNDLE_ROOT/smom-dbis-138/services/token-aggregation"
|
||||
CONFIG_SRC="$BUNDLE_ROOT/config"
|
||||
PMM_CONFIG_SRC="$BUNDLE_ROOT/cross-chain-pmm-lps/config"
|
||||
EXPLORER_SSH="${EXPLORER_SSH:-root@192.168.11.140}"
|
||||
REMOTE_DIR="${REMOTE_DIR:-/opt/token-aggregation}"
|
||||
REMOTE_SERVICE="${REMOTE_SERVICE:-token-aggregation}"
|
||||
@@ -28,6 +30,10 @@ if [[ ! -d "$SERVICE_SRC" || ! -f "$SERVICE_SRC/dist/index.js" ]]; then
|
||||
echo "Expected built service at $SERVICE_SRC (run deploy-token-aggregation-for-publication.sh first)." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ ! -d "$CONFIG_SRC" || ! -d "$PMM_CONFIG_SRC" ]]; then
|
||||
echo "Expected bundle config directories at $CONFIG_SRC and $PMM_CONFIG_SRC." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Rsync $SERVICE_SRC/ → ${EXPLORER_SSH}:${REMOTE_DIR}/"
|
||||
rsync_args=(
|
||||
@@ -46,6 +52,16 @@ fi
|
||||
RSYNC_RSH="ssh -o BatchMode=yes" rsync "${rsync_args[@]}" \
|
||||
"$SERVICE_SRC/" "${EXPLORER_SSH}:${REMOTE_DIR}/"
|
||||
|
||||
echo "Rsync $CONFIG_SRC/ → ${EXPLORER_SSH}:${REMOTE_DIR}/config/"
|
||||
RSYNC_RSH="ssh -o BatchMode=yes" rsync -avz --delete \
|
||||
"$CONFIG_SRC/" "${EXPLORER_SSH}:${REMOTE_DIR}/config/"
|
||||
|
||||
echo "Rsync $PMM_CONFIG_SRC/ → ${EXPLORER_SSH}:${REMOTE_DIR}/cross-chain-pmm-lps/config/"
|
||||
ssh -o BatchMode=yes "$EXPLORER_SSH" \
|
||||
"mkdir -p '${REMOTE_DIR}/cross-chain-pmm-lps/config'"
|
||||
RSYNC_RSH="ssh -o BatchMode=yes" rsync -avz --delete \
|
||||
"$PMM_CONFIG_SRC/" "${EXPLORER_SSH}:${REMOTE_DIR}/cross-chain-pmm-lps/config/"
|
||||
|
||||
if [[ -n "$REMOTE_SERVICE" ]]; then
|
||||
echo "Restart ${REMOTE_SERVICE} on ${EXPLORER_SSH}..."
|
||||
ssh -o BatchMode=yes "$EXPLORER_SSH" "systemctl restart '${REMOTE_SERVICE}'" || {
|
||||
|
||||
Reference in New Issue
Block a user