docs: deployment özelliklerini dokümantasyona ekle
This commit is contained in:
41
README.md
41
README.md
@@ -28,6 +28,13 @@
|
||||
- **Test Sonuçları**: Başarılı/başarısız sonuçların kaydedilmesi
|
||||
- **Log Akışı**: Gerçek zamanlı test loglarının izlenmesi
|
||||
|
||||
### 🚀 Deployment Yönetimi
|
||||
- **Root Tarama**: `DEPLOYMENTS_ROOT_HOST` altında compose dosyası olan projeleri otomatik bulma
|
||||
- **Webhook Tetikleme**: Gitea push event ile otomatik deploy
|
||||
- **Branch Seçimi**: Repo URL girince branch listesi alınır ve seçim yapılır
|
||||
- **Deploy Geçmişi**: Her deploy için log ve süre kaydı
|
||||
- **Güvenlik**: API Token + Webhook Secret ile doğrulama
|
||||
|
||||
### ⚡ Gerçek Zamanlı İletişim
|
||||
- **WebSocket Bağlantısı**: Socket.io ile sürekli iletişim
|
||||
- **Sayaç Yayınınlaması**: Global sayaç ve işlemler
|
||||
@@ -92,10 +99,15 @@ wisecolt-ci/
|
||||
│ │ ├── 📁 middleware/ # Express middleware'leri
|
||||
│ │ │ └── authMiddleware.ts
|
||||
│ │ ├── 📁 models/ # MongoDB modelleri
|
||||
│ │ │ └── job.ts
|
||||
│ │ │ ├── job.ts
|
||||
│ │ │ ├── deploymentProject.ts
|
||||
│ │ │ ├── deploymentRun.ts
|
||||
│ │ │ └── settings.ts
|
||||
│ │ ├── 📁 routes/ # API route'ları
|
||||
│ │ │ ├── auth.ts
|
||||
│ │ │ └── jobs.ts
|
||||
│ │ │ ├── jobs.ts
|
||||
│ │ │ ├── deployments.ts
|
||||
│ │ │ └── webhooks.ts
|
||||
│ │ ├── 📁 services/ # İş mantığı katmanı
|
||||
│ │ │ └── jobService.ts
|
||||
│ │ └── 📄 index.ts # Ana sunucu dosyası
|
||||
@@ -120,7 +132,10 @@ wisecolt-ci/
|
||||
│ │ ├── 📁 pages/ # Sayfa bileşenleri
|
||||
│ │ │ ├── HomePage.tsx
|
||||
│ │ │ ├── JobsPage.tsx
|
||||
│ │ │ └── JobDetailPage.tsx
|
||||
│ │ │ ├── JobDetailPage.tsx
|
||||
│ │ │ ├── DeploymentsPage.tsx
|
||||
│ │ │ ├── DeploymentDetailPage.tsx
|
||||
│ │ │ └── SettingsPage.tsx
|
||||
│ │ ├── 📁 providers/ # React Context Provider'lar
|
||||
│ │ │ ├── auth-provider.tsx
|
||||
│ │ │ ├── socket-provider.tsx
|
||||
@@ -206,6 +221,19 @@ docker compose up -d --build
|
||||
- **Log Akışı**: Test çıktılarını canlı izleme
|
||||
- **Manuel Çalıştırma**: Job'u anında tetikleme
|
||||
|
||||
### Deployment Yönetimi
|
||||
1. **Deployments** sayfasına gidin
|
||||
2. **New Deployment** ile root altında taranan projeyi seçin
|
||||
3. Repo URL + Branch + Compose dosyasını girin
|
||||
4. Kaydettikten sonra **Webhook URL**’i Gitea’da web istemci olarak tanımlayın
|
||||
|
||||
#### Webhook Ayarları (Gitea)
|
||||
- **Hedef URL**: `https://<domain>/api/deployments/webhook/<token>`
|
||||
- **Yetkilendirme Başlığı**: `Bearer <API_TOKEN>`
|
||||
- **Gizli**: `WEBHOOK_SECRET`
|
||||
- **HTTP Yöntemi**: `POST`
|
||||
- **İçerik Türü**: `application/json`
|
||||
|
||||
### Authentication
|
||||
|
||||
#### Token Yönetimi
|
||||
@@ -223,6 +251,8 @@ docker compose up -d --build
|
||||
### 📖 API Referansı
|
||||
- **Authentication API'leri**: `/auth/login`, `/auth/me`
|
||||
- **Job Yönetim API'leri**: CRUD operasyonları, manuel çalıştırma
|
||||
- **Deployment API'leri**: `/deployments`, `/deployments/:id`, `/deployments/scan`, `/deployments/branches`
|
||||
- **Webhook Endpoint**: `/api/deployments/webhook/:token`
|
||||
- **WebSocket Olayları**: Real-time iletişim ve durum güncellemeleri
|
||||
- **Endpoint Detayları**: Her endpoint için istek/yanıt formatları
|
||||
|
||||
@@ -319,8 +349,11 @@ ADMIN_PASSWORD=supersecret # Admin şifresi
|
||||
JWT_SECRET=gizli-jwt-anahtari # JWT imzalama anahtarı
|
||||
CLIENT_ORIGIN=http://localhost:5173 # Frontend adresi (CORS için)
|
||||
|
||||
# Docker Compose (.env)
|
||||
DEPLOYMENTS_ROOT_HOST=/home/wisecolt-dev/workspace # Zorunlu: host proje dizini
|
||||
|
||||
# Frontend (.env)
|
||||
VITE_API_URL=http://localhost:4000 # Backend API adresi
|
||||
VITE_API_URL=http://localhost:4000/api # Backend API adresi
|
||||
```
|
||||
|
||||
### Port Yapılandırması
|
||||
|
||||
Reference in New Issue
Block a user