Files
ytplayer/.agents/skills/deploy-prod/SKILL.md
Jonathan Sykes 3afb22b305 document repo map and local dev, add deploy-prod skill
- CLAUDE.md gains a repo map, endpoint list, and local dev setup
  (server serves only ./public — symlink ../frontend once)
- new deploy-prod skill captures the Dokploy deploy + buildTag
  verification flow; track .agents/.claude skills and skills-lock.json
- ignore server/data, test-results, .claude/worktrees
2026-07-11 13:44:57 +08:00

2.2 KiB
Raw Blame History

name, description
name description
deploy-prod Deploy ytplayer to production (worship.hesed.sbs) via the Dokploy API and verify the deploy landed. Use when the user says deploy, ship to prod, release, push to production, or asks why production doesn't show a change (pushing git does NOT deploy). Manual-only — never deploy without an explicit request.

Deploy ytplayer to production

Production is the web PWA at https://worship.hesed.sbs, running on the homelab Dokploy remote node; the control plane is Dokploy on the VPS. Pushing to git does NOT deploy — deploys are triggered explicitly.

Steps

  1. Confirm the change is pushed: git -C ~/development/personal/ytplayer status -sb must show no unpushed commits (git push origin main pushes both remotes).
  2. Record the current build tag: curl -s https://worship.hesed.sbs/api/version → note buildTag.
  3. Trigger the deploy (API key in ~/development/.secrets/dokploy-api.env; compose ID wprYCM8T51f7JtSHb983p, project ytplayer, env production):
    ssh -i ~/.ssh/tmp_vps/dokploy_session root@193.160.119.172 \
      "curl -s -X POST -H 'x-api-key: $KEY' -H 'Content-Type: application/json' \
       -d '{\"composeId\":\"wprYCM8T51f7JtSHb983p\"}' http://localhost:3000/api/compose.deploy"
    
  4. Poll until done (build ≈ 56 min; poll every ~60s, give up after ~12 min):
    # composeStatus: idle|running|done|error
    ... http://localhost:3000/api/compose.one?composeId=wprYCM8T51f7JtSHb983p
    
  5. Verify: curl -s https://worship.hesed.sbs/api/versionbuildTag must differ from step 2. Unchanged tag = the deploy did not land; report that, don't claim success.
  6. Report old tag → new tag and the compose status to the user.

If something goes wrong

  • composeStatus: error → fetch the deployment logs via the Dokploy API and report the failing step verbatim.
  • Homelab node unreachable on LAN is normal; everything above goes through the VPS hop (ssh root@193.160.119.172, then ssh root@10.8.0.2 over WireGuard if you need the node itself). App container: ytplayer-main-1dihzn-ytplayer-1.
  • Prod DB (for cleanup of Probe */Recon * test records): libsql file /app/data/ytplayer.db inside the container — delete children (video_history) first.