gebsunamy commited on
Commit
80a25de
·
verified ·
1 Parent(s): a1ad5e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -6,18 +6,18 @@ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
 
7
  WORKDIR /app
8
 
9
- # جلب المشروع من GitHub مباشرة
10
- RUN git clone https://github.com/AmmarBasha2011/QuranVideoGeneratorAPI.git .
11
 
12
- # تثبيت الاعتماديات وبناء المشروع (React + TypeScript)
13
  RUN npm install
14
  RUN npm run build
15
 
16
- # المرحلة الثانية: التشغيل (صورة خفيفة)
17
  FROM node:22-slim
18
  WORKDIR /app
19
 
20
- # تثبيت FFmpeg والخطوط العربية (ضرورية جداً للرندر)
21
  RUN apt-get update && apt-get install -y \
22
  ffmpeg \
23
  fonts-dejavu-core \
@@ -33,18 +33,15 @@ COPY --from=builder /app/client/dist ./client/dist
33
  COPY --from=builder /app/assets ./assets
34
  COPY --from=builder /app/free-photo-of-holy-quran-under-sunlight.webp ./
35
 
36
- # إنشاء المجلدات وضبط الصلاحيات (إجباري لبيئة Hugging Face)
37
  RUN mkdir -p outputs temp assets/backgrounds && \
38
  chmod -R 777 /app/outputs /app/temp /app/assets
39
 
40
  # تثبيت مكتبات التشغيل فقط
41
  RUN npm install --omit=dev
42
 
43
- # إعدادات المنافذ (Hugging Face يتوقع 7860)
44
  ENV PORT=7860
45
  ENV NODE_ENV=production
46
  EXPOSE 7860
47
 
48
- # تشغيل التطبيق
49
  CMD ["node", "dist/index.js"]
50
-
 
6
 
7
  WORKDIR /app
8
 
9
+ # جلب المشروع من فرع محدد (inex-style)
10
+ RUN git clone -b feature/inex-style-redesign-1892825162429981884 https://github.com/AmmarBasha2011/QuranVideoGeneratorAPI.git .
11
 
12
+ # تثبيت الاعتماديات وبناء المشروع
13
  RUN npm install
14
  RUN npm run build
15
 
16
+ # المرحلة الثانية: التشغيل
17
  FROM node:22-slim
18
  WORKDIR /app
19
 
20
+ # تثبيت FFmpeg والخطوط العربية
21
  RUN apt-get update && apt-get install -y \
22
  ffmpeg \
23
  fonts-dejavu-core \
 
33
  COPY --from=builder /app/assets ./assets
34
  COPY --from=builder /app/free-photo-of-holy-quran-under-sunlight.webp ./
35
 
36
+ # إنشاء المجلدات وضبط الصلاحيات
37
  RUN mkdir -p outputs temp assets/backgrounds && \
38
  chmod -R 777 /app/outputs /app/temp /app/assets
39
 
40
  # تثبيت مكتبات التشغيل فقط
41
  RUN npm install --omit=dev
42
 
 
43
  ENV PORT=7860
44
  ENV NODE_ENV=production
45
  EXPOSE 7860
46
 
 
47
  CMD ["node", "dist/index.js"]