| |
| FROM node:22-slim AS builder |
|
|
| |
| RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| 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 |
|
|
| |
| 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"] |
|
|