Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# نصب FFmpeg و فونتهای کامل فارسی
|
| 4 |
RUN apt-get update && \
|
| 5 |
apt-get install -y ffmpeg fonts-noto fonts-noto-core fonts-noto-extra fontconfig && \
|
| 6 |
fc-cache -fv && \
|
|
@@ -8,12 +8,17 @@ RUN apt-get update && \
|
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
|
|
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
-
# دسترسی
|
| 17 |
RUN chmod -R 777 /app
|
| 18 |
|
| 19 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# نصب FFmpeg و فونتهای کامل فارسی
|
| 4 |
RUN apt-get update && \
|
| 5 |
apt-get install -y ffmpeg fonts-noto fonts-noto-core fonts-noto-extra fontconfig && \
|
| 6 |
fc-cache -fv && \
|
|
|
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
+
# ساخت پوشههای لازم
|
| 12 |
+
RUN mkdir -p /app/static /app/templates /app/temp
|
| 13 |
+
|
| 14 |
+
# کپی و نصب نیازمندیها
|
| 15 |
COPY requirements.txt .
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# کپی کدهای برنامه
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# دسترسی نوشتن (مهم)
|
| 22 |
RUN chmod -R 777 /app
|
| 23 |
|
| 24 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|