From 8fe5f70ae5870422b2726f9dda6145cfa3cb94e9 Mon Sep 17 00:00:00 2001 From: alisaza Date: Sun, 13 Sep 2026 18:41:47 +0330 Subject: [PATCH] docs: add Finland/Iran infra topology Cursor rule [skip ci] --- .cursor/rules/infra-finland-iran.mdc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .cursor/rules/infra-finland-iran.mdc diff --git a/.cursor/rules/infra-finland-iran.mdc b/.cursor/rules/infra-finland-iran.mdc new file mode 100644 index 0000000..c9c77cf --- /dev/null +++ b/.cursor/rules/infra-finland-iran.mdc @@ -0,0 +1,24 @@ +--- +description: Finland git/CI/Telegram vs Iran app runtime topology +alwaysApply: true +--- + +# Infra topology (Finland vs Iran) + +Ghabilee product apps (backend, admin, frontend) follow this split: + +| Concern | Where | +| --- | --- | +| Git (`git.ghabilee.ir`) + Gitea Actions runners | **Finland** | +| All Telegram ops / deploy notifications | **Finland** (Actions secrets `TELEGRAM_*`, send from the runner) | +| App runtime (Docker Compose, Postgres, Redis, nginx, uploads) | **Iran** VPS | + +## Rules for agents + +- Do **not** send Telegram from the Iran VPS (`api.telegram.org` is unreachable there). +- Do **not** `source` full backend `.env` in shell notify paths (cron globs like `BOOKING_EXPIRY_CRON=*` break `sh`). +- Do **not** run heavy `docker build` / `next build` on the Iran box by default (OOM risk on small VPS). +- CI deploy should **build on Finland**, transfer the image to Iran, then `compose up` on Iran. +- Secrets: `VPS_*` = Iran runtime SSH; `FINLAND_*` = Finland build SSH; `TELEGRAM_*` = notify from Finland. +- Exception: `telegrambot` / telegram-relay **runs on Finland** (that is intentional). +