docs: ADAMU.md project runbook (workflow commands + Faz 0a summary)
Some checks failed
.NET Core / build (push) Has been cancelled
Some checks failed
.NET Core / build (push) Has been cancelled
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
115
ADAMU.md
Normal file
115
ADAMU.md
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
# AdamuSw — Proje Runbook
|
||||||
|
|
||||||
|
> Bu depo, OpenMU'nun **kendi ürün fork'umuz** (AdamuSw). Amaç: Castle Siege + custom özellikler (remote-NPC vb.) burada geliştirilir, kendi Docker image'imiz kaynaktan derlenir, upstream OpenMU güncellemeleri düzenli merge edilir.
|
||||||
|
>
|
||||||
|
> Bu dosya **additive**'dir (upstream'in `README.md`'sini ezmez) — `git merge upstream` sırasında çakışmaz.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Ne yaptık (Faz 0a — 2026-07-14)
|
||||||
|
|
||||||
|
Eskiden: stock `munique/openmu` image kullanılıyor, custom kod ayrı derlenip DLL olarak container'a enjekte ediliyordu (→ sürüm uyuşmazlığı / MissingMethod tuzağı).
|
||||||
|
|
||||||
|
Yenisi: **her şey tek kaynaktan derleniyor.**
|
||||||
|
|
||||||
|
1. **Baseline** — güncel upstream OpenMU (`b5a0961`) temiz olarak (`git archive`, sadece tracked dosyalar) bu depoya alındı.
|
||||||
|
2. **Remote'lar** — `origin` = Gitea (AdamuSw), `upstream` = MUnique/OpenMU (güncelleme takibi için).
|
||||||
|
3. **Kendi image** — `src/Startup/Dockerfile`'dan `adamu-openmu:dev` (388MB) derlendi.
|
||||||
|
4. **Lokal doğrulama** — postgres + image ayağa kaldırıldı: admin panel `8080` → HTTP 200, GameServer'lar dinliyor (55901-55906), ConnectServer 44405/44406, hata yok.
|
||||||
|
5. **DockerHub** — `atfatmc/adamu-openmu:latest` + `:b5a0961` push edildi, temiz pull ile doğrulandı.
|
||||||
|
|
||||||
|
**Sonraki:** Faz 0b (remote-NPC portu) → sonra Castle Siege (P1-P5). Tasarım/planlar: `docs/superpowers/`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Depo topolojisi
|
||||||
|
|
||||||
|
| Konum | Rol | Git |
|
||||||
|
|---|---|---|
|
||||||
|
| `AdamuSw/` (bu depo) | Ürün fork — CS + custom kod | `origin`=Gitea, `upstream`=MUnique |
|
||||||
|
| `../OpenMU/` | Temiz upstream referansı | `origin`=MUnique |
|
||||||
|
| `d:/OpenMU/` | Eski fork "AdaMu" — remote-NPC diff kaynağı | `origin`=Gitea/AdaMu |
|
||||||
|
|
||||||
|
Remote'lar:
|
||||||
|
```
|
||||||
|
origin https://gitea.atfatmc.com/atfatmc/AdamuSw.git (ürün)
|
||||||
|
upstream https://github.com/MUnique/OpenMU.git (referans)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Günlük iş akışı (komutlar)
|
||||||
|
|
||||||
|
### 3.1 Upstream güncellemelerini al
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd AdamuSw
|
||||||
|
git fetch upstream
|
||||||
|
git merge upstream/master
|
||||||
|
# Conflict çıkarsa: sadece bizim dokunduğumuz core dosyalarda çıkar.
|
||||||
|
# - `// ADAMU-CUSTOM` işaretlerini ara, bizim kodu koru + upstream'in yenisini birleştir.
|
||||||
|
# - Dokunulan core dosyalar: docs/superpowers/specs içindeki "touch registry"ye bak.
|
||||||
|
# Merge sonrası regresyon: (Faz 0b'den sonra) dotnet test ile NPC+CS bozulmamış mı doğrula.
|
||||||
|
git push origin main
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.2 Image derle
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd AdamuSw/src
|
||||||
|
docker build -f Startup/Dockerfile -t atfatmc/adamu-openmu:latest .
|
||||||
|
# İstersen sürüm tag'i de: -t atfatmc/adamu-openmu:<upstream-commit-kısa>
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Not (lokal `dotnet build` yaparsan):** MUTLAKA `-p:ci=true` ekle:
|
||||||
|
> ```bash
|
||||||
|
> dotnet build Startup/MUnique.OpenMU.Startup.csproj -c Release -p:ci=true
|
||||||
|
> ```
|
||||||
|
> Bu, Persistence.csproj'daki source-generator PreBuild adımını atlar (Generated.cs zaten commit'li).
|
||||||
|
> `ci=true` vermezsen `dotnet run --no-build` sıralama hatası alırsın. Dockerfile bunu zaten yapar.
|
||||||
|
|
||||||
|
### 3.3 Lokalde test et
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd AdamuSw/deploy-adamu
|
||||||
|
docker compose -f docker-compose.local.yml up -d
|
||||||
|
# boot logları:
|
||||||
|
docker compose -f docker-compose.local.yml logs -f openmu-startup
|
||||||
|
# admin panel: http://localhost:8080 (HTTP 200/302 beklenir)
|
||||||
|
# durdur:
|
||||||
|
docker compose -f docker-compose.local.yml down
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.4 DockerHub'a yayınla
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker push atfatmc/adamu-openmu:latest
|
||||||
|
# doğrula (başka makinede de aynısı):
|
||||||
|
docker pull atfatmc/adamu-openmu:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3.5 Production'a deploy (Coolify + Traefik)
|
||||||
|
|
||||||
|
- Dosya: `deploy-adamu/docker-compose.prod.yml` (mevcut AdaMu prod kurulumundan uyarlandı; TEK fark image bizim build).
|
||||||
|
- Image: `${OPENMU_IMAGE:-atfatmc/adamu-openmu:latest}` — Coolify'da `OPENMU_IMAGE` env'i ile override edilebilir.
|
||||||
|
- Coolify'da yeni image'i pull edip stack'i güncelle. `coolify` external network + Traefik label'ları (HTTPS, basicauth `adios`, Host `${SERVICE_FQDN_OPENMU_STARTUP}`, 8080) korundu.
|
||||||
|
|
||||||
|
> ⚠️ **DİKKAT:** DockerHub'daki mevcut image şu an **temiz upstream** — "her yerden NPC aç" özelliğini HENÜZ içermiyor. Production'a geçmeden önce **Faz 0b (remote-NPC portu)** tamamlanmalı; mevcut prod bu özelliğe bağımlı.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Deploy dosyaları
|
||||||
|
|
||||||
|
| Dosya | Ne için |
|
||||||
|
|---|---|
|
||||||
|
| `deploy-adamu/docker-compose.local.yml` | Lokal test (postgres + image, direkt 8080, Traefik yok) |
|
||||||
|
| `deploy-adamu/docker-compose.prod.yml` | Production (Coolify + Traefik, kendi image) |
|
||||||
|
|
||||||
|
Bunlar upstream'in `deploy/` klasörünü **ezmeden** ayrı `deploy-adamu/` klasöründe tutulur → merge çakışması olmaz.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Tasarım & planlar
|
||||||
|
|
||||||
|
- Castle Siege çatı tasarımı: `docs/superpowers/specs/2026-07-14-castle-siege-design.md`
|
||||||
|
- Faz 0a planı (bu iş): `docs/superpowers/plans/2026-07-14-phase0a-bootstrap-self-built-image.md`
|
||||||
Reference in New Issue
Block a user