From 6c9cfa5d39f6ce97ceb50ca14b7e10996dbe9926 Mon Sep 17 00:00:00 2001 From: CalderLund Date: Sat, 21 Feb 2026 11:09:46 -0800 Subject: [PATCH] feat: add deploy-prod Claude command for SSH deploy workflow Co-Authored-By: Claude Opus 4.6 --- .claude/commands/deploy-prod.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .claude/commands/deploy-prod.md diff --git a/.claude/commands/deploy-prod.md b/.claude/commands/deploy-prod.md new file mode 100644 index 0000000..251308b --- /dev/null +++ b/.claude/commands/deploy-prod.md @@ -0,0 +1,31 @@ +# Deploy to Production + +Deploy the latest main branch to the production server. + +## Server + +- **SSH**: `ssh root@167.235.133.87` +- **App directory**: `/opt/pseuno` + +## Steps + +1. SSH into the server +2. Pull the latest code from main +3. Rebuild and restart containers +4. Verify the deploy succeeded + +Run these commands over SSH: + +```bash +ssh root@167.235.133.87 "cd /opt/pseuno && git pull && docker compose -f docker-compose.prod.yml up -d --build && docker compose -f docker-compose.prod.yml ps && sleep 5 && curl -s localhost:8000/health" +``` + +If only the backend changed, you can rebuild just that service: +```bash +ssh root@167.235.133.87 "cd /opt/pseuno && git pull && docker compose -f docker-compose.prod.yml up -d --build backend && sleep 5 && curl -s localhost:8000/health" +``` + +If only the frontend changed, rebuild just frontend: +```bash +ssh root@167.235.133.87 "cd /opt/pseuno && git pull && docker compose -f docker-compose.prod.yml up -d --build frontend" +```