> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diyanet.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Operasyon Genel Bakış

> Ortam matrisi, compose dosyaları ve routing tablosu

Proje, tek bir base compose dosyası (`docker-compose.yml`) ve ortama göre üzerine binen override'larla deploy edilir. Base dosya yalnızca **uygulama servislerini** (API + iki SPA) içerir; altyapı (Postgres, Redis, RabbitMQ, Keycloak, Seq) dev'de override ile container olarak gelir, stage/prod'da kurumun mevcut altyapısından bağlanılır.

## Ortam matrisi

| Ortam           | Compose dosyaları                                  | Reverse proxy                     | TLS                           | Altyapı                                                                     |
| --------------- | -------------------------------------------------- | --------------------------------- | ----------------------------- | --------------------------------------------------------------------------- |
| **Dev**         | `docker-compose.yml` + `.override.yml` (otomatik)  | Yok — host portları               | Yok (HTTP)                    | Container (Postgres 16, Redis 7, RabbitMQ 3.13, Keycloak 26, Seq, +araçlar) |
| **Stage**       | `.yml` + `.stage.yml`                              | `nginx-proxy` + `acme-companion`  | Let's Encrypt                 | Müşterinin mevcut altyapısı                                                 |
| **Prod**        | `.yml` + `.prod.yml`                               | `nginx-proxy` + `acme-companion`  | Let's Encrypt / kurumsal cert | Müşterinin mevcut altyapısı (on-prem)                                       |
| **Stage.local** | `.yml` + `.stage.local.yml`                        | `nginx-proxy`                     | Yok (HTTP-only)               | Local container                                                             |
| **Hetzner**     | `.platform.yml` + `.shared-infra.yml` + `.app.yml` | Paylaşımlı `platform-nginx-proxy` | Let's Encrypt                 | Tek paylaşımlı infra stack, çok proje                                       |

## Compose dosyaları

| Dosya                             | Rol                                                                                  |
| --------------------------------- | ------------------------------------------------------------------------------------ |
| `docker-compose.yml`              | Base — API + Website + Admin                                                         |
| `docker-compose.override.yml`     | Dev altyapısı + host portları (`docker compose up` ile otomatik yüklenir)            |
| `docker-compose.stage.yml`        | Stage — nginx-proxy + acme + path-based routing                                      |
| `docker-compose.prod.yml`         | Prod — aynı yapı, prod realm/cert                                                    |
| `docker-compose.stage.local.yml`  | HTTP-only local stage                                                                |
| `docker-compose.platform.yml`     | Hetzner — paylaşımlı nginx-proxy + acme                                              |
| `docker-compose.shared-infra.yml` | Hetzner — paylaşımlı infra (Postgres/Redis/RabbitMQ/Keycloak/Seq/Prometheus/Grafana) |
| `docker-compose.app.yml`          | Hetzner — tek app stack (env-file ile çoğaltılır)                                    |

## Routing — dev port vs stage/prod path

Dev'de her servis kendi host portundan erişilir. Stage/prod'da tek domain altında path-based:

| Servis      | Dev (port)              | Stage / Prod (path)         |
| ----------- | ----------------------- | --------------------------- |
| Website SPA | `http://localhost:3000` | `https://{domain}/`         |
| Admin SPA   | `http://localhost:3001` | `https://{domain}/admin/`   |
| API         | `http://localhost:5005` | `https://{domain}/api/`     |
| Grafana     | `http://localhost:3030` | `https://{domain}/grafana/` |
| Keycloak    | `http://localhost:8080` | müşterinin ayrı instance'ı  |
| Seq (UI)    | `http://localhost:5342` | müşterinin ayrı instance'ı  |

nginx-proxy, container'lardaki `VIRTUAL_HOST` / `VIRTUAL_PATH` / `VIRTUAL_DEST` / `VIRTUAL_PORT` env'lerine bakarak vhost üretir; `LETSENCRYPT_HOST` ile acme-companion sertifika alır.

## Bu bölümde

<CardGroup cols={2}>
  <Card title="Dev Docker" href="/operations/docker-dev">
    Local stack, servis listesi, otomatik migration/seed.
  </Card>

  <Card title="Stage Docker" href="/operations/docker-stage">
    nginx-proxy + Let's Encrypt + dış altyapı.
  </Card>

  <Card title="Prod Docker" href="/operations/docker-prod">
    On-prem, sertifika, Hetzner çok-proje.
  </Card>

  <Card title="Ortam değişkenleri" href="/operations/env-variables">
    .env örnek dosyaları, secret kategorileri.
  </Card>

  <Card title="Gözlemlenebilirlik" href="/operations/observability">
    Seq, Prometheus, Grafana, health checks.
  </Card>

  <Card title="Komutlar" href="/operations/commands">
    Docker, dotnet ef, npm, script referansı.
  </Card>
</CardGroup>
