yusufgundogdu commited on
Commit
b1554e2
·
verified ·
1 Parent(s): 29d8972

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -8
Dockerfile CHANGED
@@ -1,16 +1,17 @@
1
- # Alpine tabanlı ultra hafif Python imajı
2
- FROM python:3.9-alpine
3
 
4
- # Çalışma dizini ve gerekli paketler
5
  WORKDIR /app
6
- RUN apk add --no-cache gcc musl-dev
7
 
8
- # Gereksinimleri kopyala ve kur
 
 
 
 
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
- # Uygulama dosyalarını kopyala
13
  COPY . .
14
 
15
- # Hafif WSGI sunucusu (waitress)
16
- CMD ["waitress-serve", "--port=8080", "--threads=2", "app:app"]
 
1
+ # Python'un slim versiyonu (Alpine'den daha stabil)
2
+ FROM python:3.9-slim
3
 
 
4
  WORKDIR /app
 
5
 
6
+ # Gerekli sistem kütüphaneleri
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ gcc \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
 
14
  COPY . .
15
 
16
+ # Flask'ın built-in sunucusu ile çalıştır (threaded mode)
17
+ CMD ["python", "app.py"]