make
This commit is contained in:
parent
98f51e5210
commit
d5d4b4e37d
6 changed files with 40 additions and 6 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -4,10 +4,11 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|||
PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
RUN apt update && apt install make -y
|
||||
|
||||
FROM base as builder
|
||||
|
||||
RUN apt update && apt install git -y
|
||||
RUN apt install git -y
|
||||
RUN pip install uv
|
||||
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
|
@ -22,12 +23,14 @@ COPY --from=builder /app/.venv /app/.venv
|
|||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
COPY src/ /app/src/
|
||||
COPY Makefile ./
|
||||
COPY .mk/ ./.mk/
|
||||
|
||||
USER appuser
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
CMD ["make", "uvicorn-prod"]
|
||||
|
||||
FROM base as development
|
||||
|
||||
|
|
@ -37,10 +40,13 @@ 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/
|
||||
RUN uv pip install -e /agent_api/
|
||||
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
|
||||
COPY Makefile ./
|
||||
COPY .mk/ ./.mk/
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
CMD ["make", "uvicorn-dev"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue