Ana içeriğe geç

Windows Native Operasyon

Windows üretim için önerilen yol. Kurucu: scripts/windows/service. Servis adı: IQVIntegrationAPI.

Mevcut kurucu kaynak tabanlıdır: go.mod (Get-RepoRoot), Go ve Git bekler. GitHub Release *-windows-native-amd64.zip bu kaynak anlık görüntüsüdür; prebuilt exe değildir. İlk kurulum zip açıldıktan sonra .env.example → .env ile çalışır. update.ps1 git worktree ister; eşleşen etiketi klonlayın veya yeni zip’i açıp install.ps1 ile onarın (runtime config\.env varsayılan korunur).

Kurulum anlatımı: Windows Service Kurulumu.

Çalışma zamanı düzeni

text C:\IQVizyon\IQVIntegrationAPI\ bin\iqv-integration-api.exe config\.env logs\installer-update.log backups\ deployment\deployment.json

Kanonik config: C:\IQVizyon\IQVIntegrationAPI\config\.env. Kökte config.env kullanmayın.

Servis durumu

powershell powershell.exe -ExecutionPolicy Bypass -File .\scripts\windows\service\status.ps1 Get-Service IQVIntegrationAPI sc.exe query IQVIntegrationAPI

Services (services.msc) içinde IQV Integration API öğesini bulun.

status.ps1 servis durumu, gecikmeli otomatik başlatma, LocalService, PID, sürüm, commit, port, MongoDB, /health/live, /health/ready, güvenlik duvarı ve redakte edilmiş kurucu günlüğünü gösterir. Yalnız sağlıklı durumda çıkış 0dır.

Başlat / durdur / yeniden başlat

```powershell Start-Service IQVIntegrationAPI Stop-Service IQVIntegrationAPI Restart-Service IQVIntegrationAPI

sc.exe start IQVIntegrationAPI sc.exe stop IQVIntegrationAPI

.\bin\iqv-integration-api.exe service start .\bin\iqv-integration-api.exe service stop .\bin\iqv-integration-api.exe service restart .\bin\iqv-integration-api.exe service status ```

Kurulum/güncelleme/kaldırma için proje scriptlerini tercih edin. Binary service komutları yalnız SCM yönetir.

Gecikmeli otomatik başlatma

Kurulum Start=Automatic ve DelayedAutoStart=true kaydeder. Yeniden başlatmadan sonra elle Start-Service gerekmez.

MongoDB bağımlılığı

Varsayılan: MongoDB adlı Windows servisine SCM bağımlılığı. Kurucu MongoDB kurmaz. MongoDB yerel Windows servisi değilse belgelenmiş no-dependency bayrağını kullanın.

Kurtarma politikası

5s, sonra 10s, sonra 30s yeniden başlatma. Sıfırlama süresi 86400 saniye.

Güvenlik duvarı

Kurucu, yapılandırılmış HTTP portu için yalnız Domain,Private inbound TCP kuralı oluşturur (Public yok). Görünen ad: IQV Integration API - TCP <port>.

powershell Get-NetFirewallRule -DisplayName "IQV Integration API - TCP *"

Günlükler

Uygulama slog çıktısı süreç stdout’udur. SCM bu stdout’u logs\ altına yazmaz. Event Log kaynağı IQVIntegrationAPI kaydedilir; uygulama slog satırlarını oraya yazmaz.

Kurucu/güncelleme dosya günlüğü:

text C:\IQVizyon\IQVIntegrationAPI\logs\installer-update.log

Bkz. Loglama.

Yedek ve metadata

Yedekler: C:\IQVizyon\IQVIntegrationAPI\backups\<timestamp>\
Metadata: C:\IQVizyon\IQVIntegrationAPI\deployment\deployment.json (secret yok).

Health

powershell Invoke-RestMethod http://127.0.0.1:<HTTP_PORT>/health/live Invoke-RestMethod http://127.0.0.1:<HTTP_PORT>/health/ready

Onarım / güncelleme / kaldırma

İşlem Komut
ServiceRepair / idempotent yeniden kurulum Servis varken install.ps1 (config korunur)
Güncelleme update.ps1 (aynı commit NO-OP; -ForceRedeploy yeniden yayınlar)
Kaldırma uninstall.ps1 (varsayılan runtime korunur)

Bkz. Güncelleme ve Geri Alma ve Kaldırma.