Enhance development workflow and deployment practices for Archipelago

- Updated the Development-Workflow documentation to clarify deployment strategy, emphasizing direct deployment to the live system for testing.
- Added detailed instructions for the deployment command, including syncing code, building frontend and backend, and restarting services.
- Improved SSH key management section to assist with authentication issues.
- Expanded the testing workflow to include steps for checking logs and syncing changes back to the ISO build.
- Updated the ISO build integration section to ensure system-level changes are captured for future builds.
- Refactored various sections for clarity and completeness, including deployment paths and system configuration files.
This commit is contained in:
Dorian
2026-02-01 13:24:03 +00:00
parent 00d1af12f0
commit 34fc06726e
28 changed files with 1248 additions and 285 deletions
+14 -6
View File
@@ -60,9 +60,9 @@ echo " Building frontend..."
ssh "$TARGET_HOST" "cd $TARGET_DIR/neode-ui && npm install --silent && npm run build" 2>&1 | sed 's/^/ /'
# Backend (if Rust is installed)
if ssh "$TARGET_HOST" "command -v cargo" >/dev/null 2>&1; then
if ssh "$TARGET_HOST" "source ~/.cargo/env 2>/dev/null && command -v cargo" >/dev/null 2>&1; then
echo " Building backend..."
ssh "$TARGET_HOST" "cd $TARGET_DIR/core && cargo build --release 2>&1" | tail -5 | sed 's/^/ /'
ssh "$TARGET_HOST" "source ~/.cargo/env && cd $TARGET_DIR/core && cargo build --release 2>&1" | tail -10 | sed 's/^/ /'
else
echo " ⚠️ Rust not installed on target, skipping backend build"
fi
@@ -71,19 +71,27 @@ if [ "$LIVE" = true ]; then
echo ""
echo "🚀 Deploying to live system..."
# Deploy backend
ssh "$TARGET_HOST" "sudo cp $TARGET_DIR/core/target/release/archipelago /usr/local/bin/ 2>/dev/null || true"
# Deploy backend (check if binary exists)
if ssh "$TARGET_HOST" "[ -f $TARGET_DIR/core/target/release/archipelago ]" 2>/dev/null; then
echo " Deploying backend binary..."
# Stop service first so we can overwrite the binary
ssh "$TARGET_HOST" "sudo systemctl stop archipelago"
ssh "$TARGET_HOST" "sudo cp $TARGET_DIR/core/target/release/archipelago /usr/local/bin/"
fi
# Deploy frontend
echo " Deploying frontend..."
ssh "$TARGET_HOST" "sudo rm -rf /opt/archipelago/web-ui/*"
ssh "$TARGET_HOST" "sudo cp -r $TARGET_DIR/neode-ui/dist/* /opt/archipelago/web-ui/"
ssh "$TARGET_HOST" "sudo cp -r $TARGET_DIR/web/dist/neode-ui/* /opt/archipelago/web-ui/"
ssh "$TARGET_HOST" "sudo chown -R 1000:1000 /opt/archipelago/web-ui"
# Restart services
ssh "$TARGET_HOST" "sudo systemctl restart archipelago nginx"
echo " Restarting services..."
ssh "$TARGET_HOST" "sudo systemctl start archipelago && sudo systemctl restart nginx"
echo ""
echo "✅ Deployed to live system!"
echo " Backend: $(ssh "$TARGET_HOST" 'sudo systemctl is-active archipelago')"
echo " Web UI: http://$(echo $TARGET_HOST | cut -d@ -f2)"
else
echo ""