-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (33 loc) · 1.05 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (33 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.12-slim
LABEL maintainer="CrawlWeaver"
LABEL description="CrawlWeaver — 12-Factor content extraction + SEO generation"
# Install uv (fast Python package manager)
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_SYSTEM_PYTHON=1
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Python deps (cached layer)
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
# App code
COPY *.py ./
COPY tools/ tools/
COPY web/ web/
COPY prompts/ prompts/
COPY cache/ cache/
# Data directories (mounted as volumes)
RUN mkdir -p /data/output /data/review /data/state /data/publish
# Environment
ENV PYTHONUNBUFFERED=1
ENV DATA_DIR=/data
ENV HOST=0.0.0.0
ENV PORT=8080
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/api/health')"
# Default: run web server
CMD ["python", "cli.py", "serve", "--host", "0.0.0.0", "--port", "8080"]