Manually sync code changes to the Autodock staging environment
Manually syncs local code changes to the Autodock staging environment and restarts services.
/plugin marketplace add mikesol/autodock-plugins/plugin install autodock@autodock-pluginsManually trigger a code sync to the staging environment. Use this after making changes that weren't automatically synced.
Check for .autodock-state in the project root:
cat .autodock-state 2>/dev/null || echo "NO_STATE"
If no state file exists:
Report: "No Autodock environment found. Run /autodock up first."
Exit.
Call mcp__autodock__env_status with the environmentId.
If status is stopped:
Environment is stopped. Run `/autodock up` to restart it first.
Same as /autodock up:
package.json for framework dependenciesnext.config.*, vite.config.*, etc.supabase/, k8s/, etc.Build array: ["nextjs", "vite"] etc.
Call mcp__autodock__env_sync with:
projectName: basename of current directorydetectedTechnologies: array from Step 2Run the rsync command from the sync instructions, excluding .env files:
rsync -avz --exclude='.env*' --exclude='node_modules' --exclude='.git' \
-e "ssh -i ~/.autodock/ssh/<slug>.pem -p <port>" \
./ ubuntu@<host>:/workspace/<projectName>/
Check if local .env has changed since last sync:
diff .env .env.autodock-original 2>/dev/null || echo "CHANGED"
If .env changed:
.env.autodock-originalClassification rules:
EXTERNAL (patch to autodock URL):
NEXT_PUBLIC_*, VITE_*, REACT_APP_*API_URL, BACKEND_URL, FRONTEND_URL, APP_URL, BASE_URL, NEXTAUTH_URLCORS_*, CSRF_TRUSTED_ORIGINS, ALLOWED_HOSTSWS_URL, WEBSOCKET_URL (use wss://)OAUTH_REDIRECT_URI, CALLBACK_URLINTERNAL (keep localhost):
DATABASE_URL, DB_HOST, POSTGRES_*, MYSQL_*REDIS_*, MONGODB_*, CACHE_URLELASTICSEARCH_URL, RABBITMQ_URL, KAFKA_*git diff HEAD~1 --name-only 2>/dev/null | grep -E 'package.json|package-lock.json|yarn.lock|pnpm-lock.yaml'
If dependencies changed:
ssh -i ~/.autodock/ssh/<slug>.pem -p <port> ubuntu@<host> \
"cd /workspace/<projectName> && bash -li -c 'npm install'"
Check if services support hot reload (HMR):
For non-HMR changes or if service crashed:
ssh -i ~/.autodock/ssh/<slug>.pem -p <port> ubuntu@<host> << 'EOF'
cd /workspace/<projectName>
# Kill existing process
pkill -f "npm run dev" || true
# Restart
export __VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS=.autodock.io
nohup bash -li -c 'npm run dev' > /workspace/logs/<projectName>.log 2>&1 </dev/null &
EOF
Update lastSync in .autodock-state:
{
"lastSync": "<timestamp>"
}
Report:
Sync complete!
**Changes synced to:** https://3000--<slug>.autodock.io
Run `/autodock status` to see all URLs.