feat: rebuild as multi-user web agent
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
FROM python:3.12-slim-bookworm@sha256:d50fb7611f86d04a3b0471b46d7557818d88983fc3136726336b2a4c657aa30b
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY pyproject.toml README.md ./
|
||||
COPY agent_platform ./agent_platform
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
python -m pip install --upgrade pip==26.1.2 \
|
||||
&& python -m pip install .
|
||||
|
||||
RUN useradd --create-home --uid 10001 agent
|
||||
WORKDIR /srv
|
||||
USER 10001:10001
|
||||
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=15s --timeout=5s --retries=10 CMD \
|
||||
python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)"
|
||||
|
||||
CMD ["uvicorn", "agent_platform.runtime.app:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips=*"]
|
||||
Reference in New Issue
Block a user