1d1cd36594
📁 Files changed: 38 📝 Lines changed: 4477 • deploy.md • .coverage • deploy.sh • cli.py • comfy.py • __init__.py • comfy_routes.py • index-BEOoAFTp.css • index-Wi7i1Rks.js • materialdesignicons-webfont-B7mPwVP_.ttf • materialdesignicons-webfont-CSr8KVlo.eot • materialdesignicons-webfont-Dp5v-WZN.woff2 • materialdesignicons-webfont-PXm3-2wK.woff • index.html • vite.svg • .gitignore • extensions.json • README.md • index.html • package-lock.json • package.json • vite.svg • App.vue • client.ts • vue.svg • DownloadsPanel.vue • GalleryView.vue • GenerateView.vue • ModelCard.vue • SearchView.vue • main.ts • app.ts • index.ts • vite-env.d.ts • tsconfig.app.json • tsconfig.json • tsconfig.node.json • vite.config.ts
50 lines
1.2 KiB
Bash
Executable File
50 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Deploy tensors to junkpile
|
|
# Usage: ./scripts/deploy.sh
|
|
|
|
set -e
|
|
|
|
REMOTE="chi@junkpile"
|
|
REMOTE_DIR="/opt/tensors/app"
|
|
LOCAL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
echo "==> Syncing Python code to junkpile..."
|
|
rsync -av --delete \
|
|
--exclude='.git' \
|
|
--exclude='__pycache__' \
|
|
--exclude='.venv' \
|
|
--exclude='node_modules' \
|
|
--exclude='.ruff_cache' \
|
|
--exclude='.mypy_cache' \
|
|
--exclude='.pytest_cache' \
|
|
--exclude='*.egg-info' \
|
|
--rsync-path="sudo rsync" \
|
|
"$LOCAL_DIR/tensors/" "$REMOTE:$REMOTE_DIR/tensors/"
|
|
|
|
echo ""
|
|
echo "==> Fixing permissions..."
|
|
ssh "$REMOTE" "sudo chown -R tensors:tensors $REMOTE_DIR && sudo chmod -R g+w $REMOTE_DIR"
|
|
|
|
echo ""
|
|
echo "==> Restarting tensors service..."
|
|
ssh "$REMOTE" "sudo systemctl restart tensors"
|
|
|
|
echo ""
|
|
echo "==> Waiting for tensors to start..."
|
|
sleep 2
|
|
|
|
echo ""
|
|
echo "==> Verifying tensors service..."
|
|
SERVICE_STATUS=$(ssh "$REMOTE" "systemctl is-active tensors" 2>/dev/null)
|
|
if [ "$SERVICE_STATUS" = "active" ]; then
|
|
echo "✓ tensors service running"
|
|
else
|
|
echo "✗ tensors service not running"
|
|
ssh "$REMOTE" "journalctl -u tensors -n 10 --no-pager"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo "==> Deploy complete!"
|
|
echo " API: http://junkpile:8081"
|