give our service a name nobody can confuse with someone else's

روی این سرور یک `gunicorn.service` هست که مالِ تیمِ دیگری است. هر کسی که
عجله داشته باشد و `systemctl restart gunicorn` بزند، سرویسِ آن‌ها را
می‌خواباند و سرویسِ ما اصلاً ری‌استارت نمی‌شود — یعنی دیپلوی بی‌صدا اعمال
نمی‌شود. همین دیشب یک بار اتفاق افتاد.

حالا همان یونیت با نامِ `zareian-mathapp` هم صدا زده می‌شود (symlink در
/etc/systemd/system). نامِ قبلی هم کار می‌کند، پس چیزی نمی‌شکند.

خط تیره و نه نقطه: systemd آخرین نقطه را جداکننده‌ی نوعِ یونیت می‌داند، پس
`zareian.mathapp` را باید هر بار کامل با `.service` نوشت.

deploy.sh هم اول دنبالِ همین نام می‌گردد.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-18 00:14:46 +03:30
parent 0132235026
commit 700b2e4c7f
2 changed files with 11 additions and 1 deletions

View File

@@ -243,6 +243,16 @@ Ours is exactly one directory: **`/home/administrator/mathapp-v2`**, served by
**`gunicorn-mathapp.service`** (unix socket, proxied by nginx). Note `~/mathapp` also
exists, is not a git repo, and is not what runs — do not touch it.
The same unit also answers to **`zareian-mathapp`** (a symlink alias in
`/etc/systemd/system/`, added 2026-09-18). Prefer that name in anything a human will type
or copy: `gunicorn` alone is a *different team's* service on this box, and `tadrisino` is
too generic for a machine where other people's projects may claim it later.
```bash
sudo systemctl restart zareian-mathapp # ours, unambiguous
sudo systemctl restart gunicorn # NOT ours — someone else's app
```
Rules that follow from this, and are not negotiable:
1. **Never run a destructive command outside `~/mathapp-v2`.** No `rm -rf`, no