Add CRM stub flag, deploy/backup scripts, CI and prod runbook
CI / backend (pull_request) Successful in 3m7s
CI / frontend (pull_request) Failing after 15m55s

- CRM_USE_STUB: local runs no longer reach the live CRM. With only the
  Checkbox stub, a stub receipt would still move the real order to PACKED.
  Refused in production, same as CHECKBOX_USE_STUB.
- scripts/deploy.sh: backup, fast-forward main, build, health check and
  code rollback on failure. scripts/backup.sh: pg_dump with verification
  and 14-day rotation (used by cron and deploy.sh).
- Gitea Actions CI: ruff + pytest, oxlint + build.
- DEPLOY.md runbook; CLAUDE.md rules for safe local development.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 20:52:20 +03:00
co-authored by Claude Opus 5.5
parent 418f6b0352
commit 2b7a92645a
13 changed files with 343 additions and 12 deletions
+3
View File
@@ -61,6 +61,9 @@ class Settings(BaseSettings):
crm_secret_key: str = ""
crm_shop_key: str = ""
crm_sid: int = 1
# Стаб вместо реальной CRM: иначе локальный worker переводил бы боевые заказы
# в PACKED после стаб-чеков Checkbox. В проде запрещено.
crm_use_stub: bool = False
# --- Nova Poshta ---
# Ключи НП хранятся у касс (`cash_registers.np_api_key_enc`). Эта переменная