feat(04-03): add matrix bot containerization
- add Dockerfile for matrix bot runtime - add compose service and env template entries
This commit is contained in:
parent
2720ee2d6e
commit
4628304979
3 changed files with 35 additions and 0 deletions
27
Dockerfile
Normal file
27
Dockerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONPATH=/app
|
||||
ENV UV_PROJECT_ENVIRONMENT=/usr/local
|
||||
|
||||
# Install uv for dependency management inside the container.
|
||||
RUN pip install --no-cache-dir uv
|
||||
|
||||
# Copy dependency manifests first for layer caching.
|
||||
COPY pyproject.toml uv.lock* ./
|
||||
|
||||
# Install project dependencies into the system environment.
|
||||
RUN uv sync --no-dev --no-install-project --frozen 2>/dev/null || uv sync --no-dev --no-install-project
|
||||
|
||||
# Copy project source after dependency layers.
|
||||
COPY . .
|
||||
|
||||
# Install the project itself and keep runtime dependencies in sync.
|
||||
RUN uv sync --no-dev --frozen 2>/dev/null || uv sync --no-dev
|
||||
|
||||
# Install lambda_agent_api from the local source tree, bypassing its Python version guard.
|
||||
RUN pip install --no-cache-dir --ignore-requires-python /app/external/platform-agent_api
|
||||
|
||||
CMD ["python", "-m", "adapter.matrix.bot"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue