Files
xciptv/DEPLOYMENT.md
2026-02-22 17:08:48 +03:00

206 lines
3.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🚀 DEPLOYMENT GUIDE - Adım Adım
## 📦 DOSYALARI GITHUB'A YÜKLE
### 1⃣ GitHub'da Yeni Repo Oluştur
1. https://github.com/new adresine git
2. Repository name: **xciptv-api** (ya da istediğin isim)
3.**Public** seç (ücretsiz için)
4. ❌ README ekleme (bizde zaten var)
5. **Create repository** tıkla
### 2⃣ Dosyaları Yükle
İki yöntem var:
#### Yöntem A: GitHub Web'den (KOLAY ✅)
1. Yeni oluşturduğun repo sayfasında:
2. **"uploading an existing file"** linkine tıkla
3. Tüm dosyaları sürükle-bırak:
- api_secured.php
- login.html
- panel.html
- config.php
- index.php
- vercel.json
- composer.json
- .gitignore
- README.md
4. Commit message: "Initial commit"
5. **Commit changes** tıkla
#### Yöntem B: Git ile (Terminal)
```bash
# Dosyaların olduğu klasöre git
cd /path/to/xciptv-deploy
# Git başlat
git init
# Dosyaları ekle
git add .
# Commit
git commit -m "Initial commit"
# GitHub'a bağla (değiştir: USERNAME ve REPO_NAME)
git remote add origin https://github.com/USERNAME/REPO_NAME.git
# Push et
git branch -M main
git push -u origin main
```
---
## 🚀 VERCEL'E DEPLOY ET
### 1⃣ Vercel'e Git
1. https://vercel.com/new adresine git
2. **"Import Git Repository"** tıkla
### 2⃣ GitHub Repo'nu Seç
1. GitHub hesabını bağla (ilk seferse)
2. Listeden **xciptv-api** repo'sunu seç
3. **Import** tıkla
### 3⃣ Deploy Ayarları
```
Framework Preset: Other
Root Directory: ./
Build Command: (boş bırak)
Output Directory: (boş bırak)
Install Command: (boş bırak)
```
### 4⃣ Deploy!
**Deploy** butonuna tıkla ve bekle (30-60 saniye).
### 5⃣ URL'ini Al
Deploy bitince sana URL verecek:
```
https://xciptv-api-xxxxx.vercel.app
```
Bu URL'i kopyala! ✅
---
## 🧪 TEST ET
### 1⃣ Admin Panel
Tarayıcıda aç:
```
https://xciptv-api-xxxxx.vercel.app/login.html
```
Giriş yap:
- Username: **admin**
- Password: **admin123**
### 2⃣ API Test
Terminal'de test et:
```bash
# Token al
curl "https://xciptv-api-xxxxx.vercel.app/api_secured.php?action=get_token&api_key=myapp_v1_secret_key_2024"
```
Response gelirse **BAŞARILI!** 🎉
---
## ⚙️ ŞİFRE DEĞİŞTİR (ÖNEMLİ!)
### 1⃣ Yeni Şifre Oluştur
Bu PHP kodunu çalıştır:
```php
<?php
echo password_hash('YeniSifren123', PASSWORD_BCRYPT);
?>
```
Çıktı:
```
$2y$10$abcdefghijklmnopqrstuvwxyz...
```
### 2⃣ api_secured.php'yi Düzenle
GitHub'daki `api_secured.php` dosyasını aç → Edit:
```php
$SECURITY_CONFIG = [
'admin_username' => 'admin', // 👈 İstersen değiştir
'admin_password' => '$2y$10$abc...', // 👈 Yeni hash'i yapıştır
];
```
**Commit changes** → Vercel otomatik yeniden deploy eder (1 dk)
---
## 🎯 APK'YA BAĞLA
APK'da kullanacağın URL:
```
https://xciptv-api-xxxxx.vercel.app/api_secured.php
```
### Token Al:
```
?action=get_token&api_key=myapp_v1_secret_key_2024
```
### Config Çek:
```
?action=get_config&token=ALDGIN_TOKEN
```
---
## 🆘 SORUN ÇÖZME
### "500 Internal Server Error"
Vercel'de PHP çalışmıyorsa:
1. `vercel.json` dosyası var mı kontrol et
2. Repo'nun root'unda olmalı
### "404 Not Found"
URL'i doğru yazdığından emin ol:
```
✅ https://xxx.vercel.app/login.html
❌ https://xxx.vercel.app/login
```
### Şifre Çalışmıyor
Yeni hash oluştur ve güncelle:
```bash
php -r "echo password_hash('admin123', PASSWORD_BCRYPT);"
```
---
## 📞 Takıldın mı?
Geri gel, birlikte hallederiz! 💪