AnesKAM commited on
Commit
a8d98f9
·
verified ·
1 Parent(s): 649492b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -10
Dockerfile CHANGED
@@ -1,20 +1,12 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y --no-install-recommends \
6
- sqlite3 \
7
- && rm -rf /var/lib/apt/lists/*
8
-
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
12
  COPY . .
13
 
14
- # تشغيل التهيئة بشكل آمن
15
- RUN python -c "import sqlite3; conn = sqlite3.connect('news_database.db'); conn.execute('''CREATE TABLE IF NOT EXISTS news (id TEXT PRIMARY KEY, title TEXT, link TEXT, summary TEXT, source TEXT, date TEXT, search_terms TEXT)'''); conn.commit(); conn.close()"
16
-
17
  EXPOSE 7860
18
 
19
- # استخدام gunicorn بدلاً من python مباشرة (أفضل للإنتاج)
20
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
1
+ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
  COPY . .
9
 
 
 
 
10
  EXPOSE 7860
11
 
12
+ CMD ["python", "app.py"]