- core/health blueprint exposes GET /health for deploy smoke tests - Replace db.create_all() + ensure_schema() ALTER patch with Alembic - Initial migration captures current schema (5 tables, all indexes) - docker-entrypoint runs wait_for_db.py + flask db upgrade before gunicorn
30 lines
774 B
Docker
30 lines
774 B
Docker
FROM python:3.11-slim
|
|
|
|
# System dependencies for opencv, moviepy, pyacoustid
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ffmpeg \
|
|
libgl1-mesa-dri \
|
|
libglib2.0-0 \
|
|
libchromaprint-tools \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Create runtime directories
|
|
RUN mkdir -p database uploads/hm_qc uploads/video_qc uploads/video_master \
|
|
storage/reports/hm_qc storage/reports/consolidated storage/campaigns \
|
|
storage/reference logs
|
|
|
|
RUN chmod +x docker-entrypoint.sh
|
|
|
|
EXPOSE 5000
|
|
|
|
ENTRYPOINT ["./docker-entrypoint.sh"]
|
|
CMD ["gunicorn", "-c", "gunicorn_config.py", "wsgi:application"]
|