Coolify requires curl/wget for HTTP healthchecks on Dockerfile deployments, but the python:3.12-slim image doesn't include them. Use python3 urllib instead. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
963 B
Docker
30 lines
963 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# System deps for PyMuPDF and document processing
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc libmupdf-dev libfreetype6-dev libharfbuzz-dev libjpeg62-turbo-dev \
|
|
libopenjp2-7-dev && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy MCP server source (for importing services)
|
|
COPY mcp-server/pyproject.toml /app/mcp-server/pyproject.toml
|
|
COPY mcp-server/src/ /app/mcp-server/src/
|
|
|
|
# Install MCP server dependencies + web deps
|
|
RUN pip install --no-cache-dir /app/mcp-server && \
|
|
pip install --no-cache-dir fastapi uvicorn python-multipart
|
|
|
|
# Copy web app
|
|
COPY web/ /app/web/
|
|
|
|
ENV PYTHONPATH=/app/mcp-server/src
|
|
ENV DOTENV_PATH=/home/chaim/.env
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=10 \
|
|
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/')" || exit 1
|
|
|
|
CMD ["uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "8080"]
|