Replace inline migration logic with proper Alembic migrations: - 001: Initial schema (creates memories table with FTS) - 002: Add multi-user and secrets columns (user_id, is_sensitive, vault_path, encrypted_content) Migrations run automatically on app startup. Existing databases are handled gracefully with IF NOT EXISTS / column existence checks.
16 lines
310 B
Docker
16 lines
310 B
Docker
FROM python:3.12-slim AS base
|
|
|
|
WORKDIR /app
|
|
|
|
COPY pyproject.toml README.md alembic.ini ./
|
|
COPY src/ src/
|
|
COPY migrations/ migrations/
|
|
|
|
RUN pip install --no-cache-dir ".[api]"
|
|
|
|
RUN useradd -r -u 1000 app
|
|
USER app
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "claude_memory.api.app:app", "--host", "0.0.0.0", "--port", "8000"]
|