Spaces:
Sleeping

File size: 734 Bytes
f7bd8a8
 
 
3e64a47
f7bd8a8
249389c
f7bd8a8
 
4b6571a
f7bd8a8
26aef0b
4b6571a
f7bd8a8
15e3e69
26aef0b
249389c
f7bd8a8
15e3e69
 
f7bd8a8
15e3e69
 
249389c
f7bd8a8
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# =====================================================
# Dockerfile — Pegos Data API (FastAPI + HF Spaces)
# =====================================================

FROM python:3.10-slim

# Sistem güncellemeleri ve bağımlılıklar
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*

# Uygulama dizini
WORKDIR /app

# Python bağımlılıklarını yükle
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Uygulama dosyalarını kopyala
COPY . .

# Hugging Face Spaces uyumlu dinamik port
ENV PORT=7860
EXPOSE $PORT

# Non-root kullanıcı
RUN useradd -m user
USER user

# FastAPI sunucusunu başlat
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port $PORT"]