Easypanel Deploy Rehberi - RepoDocs
Easypanel Deploy Rehberi - RepoDocs
Ön Gereksinimler
- Easypanel kurulu VPS (OVH veya başka)
- Domain (opsiyonel ama önerilir)
- GitHub hesabı (OAuth için)
ADIM 1: GitHub OAuth App Oluştur
- GitHub'a git: https://github.com/settings/developers
- "New OAuth App" tıkla
- Bilgileri doldur:
- Application name: RepoDocs (veya istediğin isim)
- Homepage URL:
https://repodocs.senindomain.com(veya Easypanel'in vereceği URL) - Authorization callback URL:
https://repodocs.senindomain.com/api/auth/callback/github
- "Register application" tıkla
- Client ID'yi not al
- "Generate a new client secret" tıkla ve Client Secret'ı not al
⚠️ Client Secret sadece bir kez gösterilir, kaydet!
ADIM 2: Easypanel'de Proje Oluştur
- Easypanel dashboard'a gir
- "Create Project" tıkla
- Proje adı:
repodocs
ADIM 3: PostgreSQL Database Ekle
- Proje içinde "+" tıkla → "Database" seç
- PostgreSQL seç
- Ayarlar:
- Name:
postgres - Database:
repodocs - Username:
repodocs - Password: Güçlü bir şifre oluştur (not al!)
- Name:
- "Create" tıkla
- Oluşunca "Connection String"i kopyala:
ADIM 4: Redis Ekle
- Proje içinde "+" tıkla → "Database" seç
- Redis seç
- Ayarlar:
- Name:
redis
- Name:
- "Create" tıkla
- Connection string:
ADIM 5: App Service Ekle (GitHub'dan)
- Proje içinde "+" tıkla → "App" seç
- GitHub seç
- Repository'ni seç (veya URL yapıştır)
- Ayarlar:
- Name:
app - Branch:
main - Build Method: Dockerfile
- Dockerfile Path:
Dockerfile - Port:
3000
- Name:
ADIM 6: Environment Variables Ayarla
App service'inde "Environment" sekmesine git ve şunları ekle:
Secret Oluşturma (Terminal'de):
ADIM 7: Domain Ayarla
- App service'inde "Domains" sekmesine git
- "Add Domain" tıkla
- Domain gir:
repodocs.senindomain.com - DNS'te A record ekle:
- Type: A
- Name: repodocs
- Value: Sunucu IP adresi
- SSL otomatik aktif olacak (Let's Encrypt)
ADIM 8: Deploy Et
- "Deploy" butonuna tıkla
- Build loglarını takip et
- İlk build 3-5 dakika sürebilir
ADIM 9: Database Migration
Deploy tamamlandıktan sonra, Easypanel'de app container'ına terminal aç:
- App service → "Terminal" sekmesi
- Şu komutu çalıştır:
Veya Easypanel "Commands" özelliği varsa oradan çalıştır.
ADIM 10: GitHub OAuth Callback URL Güncelle
Domain aldıysan, GitHub OAuth App'e dön ve callback URL'i güncelle:
Kontrol Listesi ✅
- GitHub OAuth App oluşturuldu
- PostgreSQL database oluşturuldu
- Redis oluşturuldu
- App service oluşturuldu
- Environment variables eklendi
- Domain ayarlandı (opsiyonel)
- Deploy başarılı
- Database migration yapıldı
- Login test edildi
Sorun Giderme
Build Hatası
- Logs sekmesinden hata mesajını kontrol et
- Memory yetersizse Easypanel'de resource limit artır
Database Bağlantı Hatası
- DATABASE_URL'deki host adının doğru olduğundan emin ol
- Easypanel internal network:
repodocs_postgresformatında
GitHub Login Çalışmıyor
- NEXTAUTH_URL'in doğru olduğundan emin ol (https dahil)
- GitHub OAuth callback URL'in eşleştiğinden emin ol
- NEXTAUTH_SECRET'ın set edildiğinden emin ol
Redis Bağlantı Hatası
- REDIS_URL'deki host:
repodocs_redisformatında