54b69f0d68
- Move alembic/ directory to nextcloud_mcp_server/alembic/ subpackage - Update migrations.py to use package location instead of alembic.ini - Update env.py to set script_location dynamically - Update alembic.ini for development CLI usage - Fix Dockerfile typo: .vnev -> .venv This fixes FileNotFoundError when running in Docker with non-editable install. The alembic package is now installed with the main package, making it work in both development and production environments. Resolves: Docker startup error 'alembic.ini not found at /app/.venv/lib/python3.12/site-packages/alembic.ini' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
901 B
Docker
29 lines
901 B
Docker
FROM docker.io/library/python:3.12-slim-trixie@sha256:fa48eefe2146644c2308b909d6bb7651a768178f84fc9550dcd495e4d6d84d01
|
|
|
|
COPY --from=ghcr.io/astral-sh/uv:0.9.17@sha256:5cb6b54d2bc3fe2eb9a8483db958a0b9eebf9edff68adedb369df8e7b98711a2 /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 \
|
|
tesseract-ocr \
|
|
sqlite3 && apt clean
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml uv.lock README.md .
|
|
|
|
RUN uv sync --locked --no-dev --no-install-project --no-cache
|
|
|
|
COPY . .
|
|
|
|
RUN uv sync --locked --no-dev --no-editable --no-cache
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV VIRTUAL_ENV=/app/.venv
|
|
ENV PATH=/app/.venv/bin:$PATH
|
|
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/5/tessdata
|
|
|
|
ENTRYPOINT ["/app/.venv/bin/nextcloud-mcp-server", "run", "--host", "0.0.0.0"]
|