Create Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647# المرحلة الأولى: جلب الكود وبناؤه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 installRUN npm run build
# المرحلة الثانية: التشغيلFROM node:22-slimWORKDIR /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 ./distCOPY --from=builder /app/client/dist ./client/distCOPY --from=builder /app/assets ./assetsCOPY --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=7860ENV NODE_ENV=productionEXPOSE 7860
CMD ["node", "dist/index.js"]DockerfileAdded+47