# Port Güncelleme - 8081 → 8090

## Değişiklik Özeti

Port 8081 zaten kullanımda olduğu için FreeCAD Python API portu **8090** olarak güncellendi.

## Güncellenen Dosyalar

### 1. docker-compose.yml
```yaml
ports:
  - "9000:9000"   # Go Fiber API
  - "8090:8090"   # Python FreeCAD API (eski: 8081)

environment:
  - FREECAD_API_URL=http://localhost:8090
  - FREECAD_API_PORT=8090
```

### 2. Dockerfile
```dockerfile
ENV FREECAD_API_URL=http://localhost:8090
ENV FREECAD_API_PORT=8090
```

### 3. start.sh
```bash
echo "[1/2] Starting FreeCAD Python API on port 8090..."
```

### 4. freecad_handler.go
```go
func init() {
    if freecadAPIURL == "" {
        freecadAPIURL = "http://localhost:8090" // Varsayılan
    }
}
```

### 5. freecad_api_server.py
```python
port = int(os.getenv('FREECAD_API_PORT', '8090'))
```

## Yeni Port Yapısı

| Servis | Port | Açıklama |
|--------|------|----------|
| Go Fiber API | 9000 | Ana API endpoint |
| Python FreeCAD API | 8090 | FreeCAD analiz servisi |

## Test Komutları

```bash
# Python API direkt test
curl http://localhost:8090/health

# Go Proxy üzerinden test
curl http://localhost:9000/uyar/api/freecad/health

# STEP analizi
curl -X POST http://localhost:9000/uyar/api/freecad/analyze \
  -F "file=@model.stp"
```

## Docker Yeniden Başlatma

```bash
# Eski container'ı durdur
docker-compose down

# Yeniden build (opsiyonel)
docker-compose build

# Yeni portla başlat
docker-compose up -d

# Logları kontrol et
docker-compose logs -f
```

## Troubleshooting

### Port hala kullanımda hatası
```bash
# Windows'ta portu kontrol et
netstat -ano | findstr "8090"

# Process'i kapat (eğer gerekirse)
taskkill /PID <PID> /F
```

### Container portlarını kontrol et
```bash
docker ps
# PORTS sütununda: 0.0.0.0:8090->8090/tcp görmelisiniz
```

---
**Not**: Tüm dosyalar güncellendi. Artık `docker-compose up -d` yapabilirsiniz.
