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’ı |
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
Dev Docker
Local stack, servis listesi, otomatik migration/seed.
Stage Docker
nginx-proxy + Let’s Encrypt + dış altyapı.
Prod Docker
On-prem, sertifika, Hetzner çok-proje.
Ortam değişkenleri
.env örnek dosyaları, secret kategorileri.
Gözlemlenebilirlik
Seq, Prometheus, Grafana, health checks.
Komutlar
Docker, dotnet ef, npm, script referansı.