Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -1,25 +1,25 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# نصب FFmpeg و ابزارهای
|
| 4 |
RUN apt-get update && \
|
| 5 |
apt-get install -y ffmpeg wget fontconfig && \
|
| 6 |
rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
-
# --- نصب فونتهای فارسی ---
|
| 9 |
RUN mkdir -p /usr/share/fonts/truetype/persian
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
RUN wget https://github.com/
|
| 13 |
|
| 14 |
-
#
|
| 15 |
RUN wget https://github.com/google/fonts/raw/main/ofl/lalezar/Lalezar-Regular.ttf -O /usr/share/fonts/truetype/persian/Lalezar.ttf
|
| 16 |
|
| 17 |
-
#
|
| 18 |
RUN fc-cache -fv
|
| 19 |
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
-
#
|
| 23 |
RUN mkdir -p /app/static /app/temp
|
| 24 |
|
| 25 |
COPY requirements.txt .
|
|
@@ -27,7 +27,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 27 |
|
| 28 |
COPY . .
|
| 29 |
|
| 30 |
-
#
|
| 31 |
RUN chmod -R 777 /app
|
| 32 |
|
| 33 |
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 wget fontconfig && \
|
| 6 |
rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
+
# --- نصب فونتهای حرفهای فارسی ---
|
| 9 |
RUN mkdir -p /usr/share/fonts/truetype/persian
|
| 10 |
|
| 11 |
+
# 1. وزیر متن (متن اصلی)
|
| 12 |
+
RUN wget https://github.com/google/fonts/raw/main/ofl/vazirmatn/Vazirmatn-Bold.ttf -O /usr/share/fonts/truetype/persian/Vazirmatn-Bold.ttf
|
| 13 |
|
| 14 |
+
# 2. لاله زار (تیتر فانتزی)
|
| 15 |
RUN wget https://github.com/google/fonts/raw/main/ofl/lalezar/Lalezar-Regular.ttf -O /usr/share/fonts/truetype/persian/Lalezar.ttf
|
| 16 |
|
| 17 |
+
# کش کردن فونتها
|
| 18 |
RUN fc-cache -fv
|
| 19 |
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
+
# ساختار پوشهها
|
| 23 |
RUN mkdir -p /app/static /app/temp
|
| 24 |
|
| 25 |
COPY requirements.txt .
|
|
|
|
| 27 |
|
| 28 |
COPY . .
|
| 29 |
|
| 30 |
+
# پرمیشن
|
| 31 |
RUN chmod -R 777 /app
|
| 32 |
|
| 33 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|