Point backend deploy docs at gitea.meshkee.com.

Production now pulls meshkee-app/backend over SSH port 2222 instead of the old git.meshkee.com remote.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-14 11:20:48 +03:30
co-authored by Cursor
parent 30119e6d9e
commit c76c3967bb
2 changed files with 11 additions and 11 deletions
+7 -7
View File
@@ -8,7 +8,7 @@ alwaysApply: true
When deploying the Meshkee CMS API to production (`api.meshkee.com` / VM `/opt/meshkee/app`):
1. **Commit** the changes (only when the user asked to commit/deploy).
2. **Push** to `origin` (`https://git.meshkee.com/Meshkee/backend.git`, usually `main`).
2. **Push** to `origin` (`https://gitea.meshkee.com/meshkee-app/backend.git`, usually `main`).
3. **On the API VM**, update from git and rebuild — do **not** rsync/scp the app tree as the normal deploy path.
```bash
@@ -34,17 +34,17 @@ REMOTE
## VM git access
Deploy key (read-only) on `git.meshkee.com` for repo `Meshkee/backend`, installed as `/root/.ssh/id_ed25519` on the API VM.
Deploy key (read-only) on `gitea.meshkee.com` for repo `meshkee-app/backend`, installed as `/root/.ssh/id_ed25519` on the API VM.
Gitea SSH listens on **port 222** (not 22). The API VM must have `/root/.ssh/config`:
Gitea SSH listens on **port 2222** (not 22). The API VM must have `/root/.ssh/config`:
```
Host git.meshkee.com
HostName git.meshkee.com
Host gitea.meshkee.com
HostName gitea.meshkee.com
User git
Port 222
Port 2222
IdentityFile /root/.ssh/id_ed25519
IdentitiesOnly yes
```
Remote URL: `git@git.meshkee.com:Meshkee/backend.git` (port comes from SSH config).
Remote URL: `git@gitea.meshkee.com:meshkee-app/backend.git` (port comes from SSH config).
+4 -4
View File
@@ -8,7 +8,7 @@ API domain: `api.meshkee.com` → `https://api.meshkee.com/api/v1`
Per-business API aliases (same Nest app on this VM): `api.{apex}` e.g. `api.sanihome.ir` → `https://api.sanihome.ir/api/v1`. Storefronts still pass the **website apex** in paths (`/tenants/sanihome.ir/...`); only the API hostname changes.
> **Deploy path:** push to `git.meshkee.com` (`Meshkee/backend`), then on the API VM `git fetch` + `reset --hard origin/main` + build + `pm2 restart`. Do **not** rsync the app as the normal update path. The API VM uses a read-only SSH deploy key (`meshkee-api-vm-deploy`). Pin `sharp@0.33.5` — this VM CPU lacks x64-v2 required by sharp 0.35+.
> **Deploy path:** push to `gitea.meshkee.com` (`meshkee-app/backend`), then on the API VM `git fetch` + `reset --hard origin/main` + build + `pm2 restart`. Do **not** rsync the app as the normal update path. The API VM uses a read-only SSH deploy key (`meshkee-api-vm-deploy`). Pin `sharp@0.33.5` — this VM CPU lacks x64-v2 required by sharp 0.35+.
## Prerequisites
@@ -207,7 +207,7 @@ Dashboards VPS keeps using `GET /api/v1/internal/ssl/hosts` (`business.` / `cust
From your laptop:
1. Commit and **push** to `origin/main` (`git.meshkee.com/Meshkee/backend`).
1. Commit and **push** to `origin/main` (`gitea.meshkee.com/meshkee-app/backend`).
2. Deploy on the API VM from that commit (never rsync the tree as the primary path):
```bash
@@ -224,9 +224,9 @@ pm2 restart meshkee-api
REMOTE
```
Preserve `/opt/meshkee/app/.env` on the server. App remote must be SSH: `git@git.meshkee.com:Meshkee/backend.git` with the VM deploy key registered as a **read-only deploy key** on the repo.
Preserve `/opt/meshkee/app/.env` on the server. App remote must be SSH: `git@gitea.meshkee.com:meshkee-app/backend.git` with the VM deploy key registered as a **read-only deploy key** on the repo.
Gitea SSH is on **port 222**. On the API VM, `/root/.ssh/config` must set `Port 222` for `Host git.meshkee.com` (system SSH on 22 is not Gitea).
Gitea SSH is on **port 2222**. On the API VM, `/root/.ssh/config` must set `Port 2222` for `Host gitea.meshkee.com` (system SSH on 22 is not Gitea).
## Useful commands