Flask backend ve React frontend ile geliştirilmiş yastık öneri sistemi.
-
Backend'i başlat:
cd backend python -m venv venv .\venv\Scripts\Activate.ps1 pip install -r requirements.txt python main.py
-
Frontend'i başlat:
cd frontend npm install npm start
-
Backend environment dosyası oluştur:
cd backend copy env_production.txt .env
-
Frontend production build al:
cd frontend npm install npm run build
-
IIS'e manuel deploy et
PillowSelectionRobot/
├── backend/ # Flask API
│ ├── main.py # Ana uygulama
│ ├── requirements.txt # Python bağımlılıkları
│ ├── web.config # IIS yapılandırması
│ ├── env_example.txt # Geliştirme environment örneği
│ └── env_production.txt # Canlı ortam ayarları
├── frontend/ # React uygulaması
│ ├── src/
│ │ ├── config.js # API konfigürasyonu (otomatik domain)
│ │ └── components/ # React bileşenleri
│ └── build/ # Production build
└── PRODUCTION_CHECKLIST.md # Canlı ortam kontrol listesi
# Veritabanı
DATABASE_URL=mssql+pyodbc://username:password@server/database?driver=ODBC+Driver+17+for+SQL+Server
# Mail ayarları
MAIL_SERVER=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=your-email@domain.com
MAIL_PASSWORD=your-password
MAIL_DEFAULT_SENDER=your-email@domain.com
# Ortam
FLASK_ENV=production
ALLOWED_ORIGINS=https://mastermatch.doquhome.com.tr// config.js otomatik olarak ortamı algılar:
// Development: http://localhost:5000
// Production: https://mastermatch.doquhome.com.trGET /api/health- Sistem sağlık kontrolüGET /api/questions- Sorular listesiGET /api/yastiklar- Yastık listesiPOST /api/recommend- Yastık önerisiPOST /api/kvkk_onay_ekle- KVKK onayıGET /api/kvkk_metin- KVKK metniPOST /api/log_urun_inceleme- Ürün inceleme loguPOST /api/save-mail- Mail gönderme
- Frontend: http://localhost:3000
- Backend: http://localhost:5001
- API Health: http://localhost:5001/api/health
- Site: https://mastermatch.doquhome.com.tr
- API: https://mastermatch.doquhome.com.tr/api
- API Health: mastermatch.doquhome.com.tr/api/health
# Environment dosyası oluştur
cd backend
copy env_production.txt .env
# Python ortamı kur
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
pip install wfastcgi
wfastcgi-enable
# IIS'e kopyala
# C:\inetpub\wwwroot\PillowSelectionRobot\backend\# Production build al
cd frontend
npm install
npm run build
# IIS'e kopyala
# C:\inetpub\wwwroot\PillowSelectionRobot\- Ana Site:
PillowSelectionRobot→C:\inetpub\wwwroot\PillowSelectionRobot - API Alt Uygulaması:
api→C:\inetpub\wwwroot\PillowSelectionRobot\backend - Application Pool:
.NET CLR Version: No Managed Code
Detaylı kontrol listesi için PRODUCTION_CHECKLIST.md dosyasını inceleyin.
# Health kontrolü
Invoke-WebRequest -Uri "http://localhost:5001/api/health"
# Event Viewer kontrolü
Get-EventLog -LogName Application -Source W3SVC* -Newest 10- IIS Manager'da site durumunu kontrol edin
- Application Pool'un çalıştığını kontrol edin
- Dosya izinlerini kontrol edin
pip uninstall wfastcgi
pip install wfastcgi
wfastcgi-enable