updated modelgen, decoupling tester

This commit is contained in:
2026-04-12 03:07:25 -03:00
parent af06309dad
commit 85a856b7ac
58 changed files with 4770 additions and 625 deletions

46
ctrl/deploy.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/bash
# Deploy soleprint standalone to server
#
# Usage:
# ./ctrl/deploy.sh # Sync and restart
# ./ctrl/deploy.sh --build # Rebuild locally first, then sync and restart
# ./ctrl/deploy.sh --sync-only # Sync without restarting
set -e
cd "$(dirname "$0")/.."
SERVER="mcrn.ar"
REMOTE_DIR="~/soleprint/gen/standalone"
BUILD=false
SYNC_ONLY=false
for arg in "$@"; do
case $arg in
--build) BUILD=true ;;
--sync-only) SYNC_ONLY=true ;;
esac
done
if [ "$BUILD" = true ]; then
echo "Building standalone..."
python build.py
fi
echo "Syncing gen/standalone/ to $SERVER:$REMOTE_DIR..."
rsync -avz --delete \
--exclude='__pycache__' \
--exclude='.venv' \
--exclude='*.pyc' \
--exclude='.env' \
--filter=':- .gitignore' \
gen/standalone/ "$SERVER:$REMOTE_DIR/"
if [ "$SYNC_ONLY" = true ]; then
echo "Sync complete (restart skipped)"
exit 0
fi
echo "Restarting soleprint on server..."
ssh "$SERVER" "cd $REMOTE_DIR && docker compose up -d --build"
echo "Deploy complete"