45 lines
1.4 KiB
Docker
45 lines
1.4 KiB
Docker
# Dockerfile for Smithery stateless deployment
|
|
# ADR-016: Stateless mode for multi-user public Nextcloud instances
|
|
#
|
|
# This image excludes:
|
|
# - Vector database dependencies (qdrant-client)
|
|
# - Background sync workers
|
|
# - Admin UI routes (/app)
|
|
# - Semantic search tools
|
|
#
|
|
# Features included:
|
|
# - Core Nextcloud tools (notes, calendar, contacts, files, deck, tables, cookbook)
|
|
# - Per-session app password authentication
|
|
# - Multi-user support via Smithery session config
|
|
|
|
FROM docker.io/library/python:3.12-slim-trixie@sha256:fa48eefe2146644c2308b909d6bb7651a768178f84fc9550dcd495e4d6d84d01
|
|
|
|
WORKDIR /app
|
|
|
|
# Install uv for fast dependency management
|
|
COPY --from=ghcr.io/astral-sh/uv:0.9.18@sha256:5713fa8217f92b80223bc83aac7db36ec80a84437dbc0d04bbc659cae030d8c9 /uv /uvx /bin/
|
|
|
|
# Install dependencies
|
|
# 1. git (required for caldav dependency from git)
|
|
# 2. sqlite for development with token db
|
|
RUN apt update && apt install --no-install-recommends --no-install-suggests -y \
|
|
git
|
|
|
|
# Copy project files
|
|
COPY . .
|
|
|
|
RUN uv sync --locked --no-dev --no-editable --no-cache
|
|
|
|
# Set Smithery mode environment variables
|
|
ENV SMITHERY_DEPLOYMENT=true
|
|
ENV VECTOR_SYNC_ENABLED=false
|
|
|
|
# Smithery sets PORT=8081 by default
|
|
EXPOSE 8081
|
|
|
|
# Health check endpoint
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD uv run python -c "import httpx; httpx.get('http://localhost:${PORT:-8081}/health/live').raise_for_status()"
|
|
|
|
CMD ["/app/.venv/bin/smithery-main"]
|