first commit

This commit is contained in:
Ashim Kumar
2026-02-20 13:53:36 +06:00
commit 8e02b9ad09
35 changed files with 11059 additions and 0 deletions

51
Dockerfile Normal file
View File

@@ -0,0 +1,51 @@
# ============================================
# Audiobook Maker Pro v4 - Production Dockerfile
# CPU-only build — no CUDA/MPS dependencies
# ============================================
FROM python:3.11-slim
# Install system dependencies for pydub (ffmpeg), python-docx, olefile, PyMuPDF
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
libmupdf-dev \
libfreetype6 \
libharfbuzz0b \
libjpeg62-turbo \
libopenjp2-7 \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better layer caching
COPY requirements.txt .
# Install Python dependencies — CPU only, no CUDA
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create the persistent data directory at build time
# (Coolify volume mount will overlay this at runtime)
RUN mkdir -p /opt/apps/audiobook-maker-pro-v4
# Expose the application port
EXPOSE 5009
# Health check — Coolify uses this to determine container readiness
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:5009/login')" || exit 1
# Run with gunicorn for production
CMD ["gunicorn", \
"--bind", "0.0.0.0:5009", \
"--workers", "3", \
"--threads", "2", \
"--timeout", "300", \
"--worker-class", "gthread", \
"--access-logfile", "-", \
"--error-logfile", "-", \
"app:app"]