--- name: deployprod description: Promote the dev.smesh.lol instance to production smesh.lol. This skill should be used when the user invokes /deployprod after testing changes on dev. Copies the relay binary and web assets from the dev instance to prod on root@orly, then restarts the prod service. No local rebuild needed. --- # Deploy to Production Promote dev.smesh.lol to smesh.lol by copying the running dev binary and web assets to the prod instance on root@orly. ## Preconditions Before promoting, verify: 1. Dev relay is running and healthy: `ssh root@orly 'systemctl is-active smesh-dev'` 2. Confirm with the user that dev has been tested ## Procedure Execute these steps in order via `ssh root@orly`: 1. Stop the prod relay: ``` ssh root@orly 'systemctl stop smesh' ``` Wait for the store flush to complete (can take 10-20s). Verify with `systemctl is-active smesh` returning `inactive`. 2. Copy the relay binary: ``` ssh root@orly 'cp /home/mleku/.local/bin/smesh-dev /home/mleku/.local/bin/smesh' ``` 3. Sync web assets: ``` ssh root@orly 'rsync -a --delete /home/mleku/smesh-web-dev/ /home/mleku/smesh-web/' ``` 4. Start the prod relay: ``` ssh root@orly 'systemctl start smesh' ``` 5. Verify prod is running: ``` ssh root@orly 'systemctl is-active smesh' ``` Should return `active`. Check the journal for startup confirmation: ``` ssh root@orly 'journalctl -u smesh -n 5 --no-pager' ``` Look for `ORLY ... listening on 127.0.0.1:3335`. 6. Smoke test: ``` curl -s 'https://smesh.lol/' -H 'Accept: application/nostr+json' | head -1 ``` ## Instance Layout | | dev | prod | |---|---|---| | Binary | `/home/mleku/.local/bin/smesh-dev` | `/home/mleku/.local/bin/smesh` | | Web assets | `/home/mleku/smesh-web-dev/` | `/home/mleku/smesh-web/` | | Service | `smesh-dev.service` | `smesh.service` | | Data | `/home/mleku/smesh-data-dev/` | `/home/mleku/smesh-data/` | | Port | 3336 | 3335 | ## Important - Never deploy directly to prod. Always deploy to dev first and test. - The prod data directory is NOT copied - only the binary and web assets. - The store flush on stop can take 10-20s. Do not kill or rush it.