Download Dockerfile from gebsunamy/QuranVideoGeneratorAPI: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/spaces/gebsunamy/QuranVideoGeneratorAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/gebsunamy/QuranVideoGeneratorAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/gebsunamy/QuranVideoGeneratorAPI/resolve/main/Dockerfile
1.44 kB
| # المرحلة الأولى: جلب الكود وبناؤه | |
| FROM node:22-slim AS builder | |
| # تثبيت git لجلب المستودع | |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # جلب المشروع من فرع محدد (inex-style) | |
| RUN git clone -b feature/inex-style-redesign-1892825162429981884 https://github.com/AmmarBasha2011/QuranVideoGeneratorAPI.git . | |
| # تثبيت الاعتماديات وبناء المشروع | |
| RUN npm install | |
| RUN npm run build | |
| # المرحلة الثانية: التشغيل | |
| FROM node:22-slim | |
| WORKDIR /app | |
| # تثبيت FFmpeg والخطوط العربية | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| fonts-dejavu-core \ | |
| fonts-freefont-ttf \ | |
| fonts-noto-core \ | |
| fonts-noto-ui-core \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # نسخ الملفات من مرحلة البناء | |
| COPY --from=builder /app/package*.json ./ | |
| COPY --from=builder /app/dist ./dist | |
| COPY --from=builder /app/client/dist ./client/dist | |
| COPY --from=builder /app/assets ./assets | |
| COPY --from=builder /app/free-photo-of-holy-quran-under-sunlight.webp ./ | |
| # إنشاء المجلدات وضبط الصلاحيات | |
| RUN mkdir -p outputs temp assets/backgrounds && \ | |
| chmod -R 777 /app/outputs /app/temp /app/assets | |
| # تثبيت مكتبات التشغيل فقط | |
| RUN npm install --omit=dev | |
| ENV PORT=7860 | |
| ENV NODE_ENV=production | |
| EXPOSE 7860 | |
| CMD ["node", "dist/index.js"] | |