-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.worker
More file actions
32 lines (24 loc) · 887 Bytes
/
Dockerfile.worker
File metadata and controls
32 lines (24 loc) · 887 Bytes
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
FROM python:3.13-slim
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install dependencies first for better layer caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code (same as API — shares layers when built together)
COPY api/ api/
COPY config/ config/
# Copy .claude subdirectories if they exist (agents for system prompts, templates for output formats)
COPY .claude/ .claude/
COPY knowledge/ knowledge/
COPY alembic.ini* ./
COPY pyproject.toml* ./
COPY run_worker.py .
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
# Create writable directories before switching to non-root user
RUN mkdir -p logs /data/db /data/output /data/transcripts
# Run as non-root user for security
RUN useradd --create-home appuser && chown -R appuser:appuser logs config /data
USER appuser
ENTRYPOINT ["./entrypoint.sh"]
CMD ["python", "run_worker.py"]