0f760c379d
doc-service and ai-service no longer use local filesystem directories — all file and config I/O goes through storage-service. Update README and CLAUDE.md to reflect 6-service architecture, new volumes, and add storage-service step to the "Adding a new resource" checklist. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
1.2 KiB
Docker
35 lines
1.2 KiB
Docker
# ── Stage 1: dependency installation ─────────────────────────────────────────
|
|
FROM python:3.12-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
COPY pyproject.toml .
|
|
RUN pip install --prefix=/install .
|
|
|
|
# ── Stage 2: runtime ──────────────────────────────────────────────────────────
|
|
FROM python:3.12-slim
|
|
|
|
# Create non-root user (UID/GID 1001)
|
|
RUN groupadd --gid 1001 appuser && \
|
|
useradd --uid 1001 --gid 1001 --no-create-home --shell /bin/sh appuser
|
|
|
|
# Pre-create watch dir with correct ownership.
|
|
# /data/documents and /config are no longer used — all file/config storage goes through storage-service.
|
|
RUN mkdir -p /data/watch && chown -R appuser:appuser /data
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /install /usr/local
|
|
COPY --chown=appuser:appuser app ./app
|
|
COPY --chown=appuser:appuser alembic ./alembic
|
|
COPY --chown=appuser:appuser alembic.ini .
|
|
COPY --chown=appuser:appuser scripts ./scripts
|
|
|
|
USER appuser
|
|
|
|
EXPOSE 8001
|
|
|
|
CMD ["sh", "scripts/start.sh"]
|