контейнеризация для dev
This commit is contained in:
parent
1e9fa1f702
commit
bece7ab23b
4 changed files with 50 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
FROM python:3.14-slim as base
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
FROM base as development
|
||||
|
||||
RUN pip install uv
|
||||
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync --frozen --no-install-project
|
||||
|
||||
COPY --from=agent_api . /agent_api/
|
||||
RUN uv pip install -e /agent_api/
|
||||
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue