Harden production workflows and agent admission

This commit is contained in:
Stanislav Rossovskii
2026-05-28 14:19:27 +04:00
parent a2e88b4e76
commit 37b1a1d6d6
109 changed files with 4927 additions and 894 deletions

View File

@@ -20,8 +20,17 @@ RUN --mount=type=cache,target=/root/.cache/uv uv sync --frozen --no-dev
FROM python:3.14-slim
ENV PATH="/app/.venv/bin:$PATH" \
PYTHONUNBUFFERED=1
# PH-015: non-root runtime user. UID/GID are stable so bind-mounts can be
# pre-chowned by operators if they need writable host paths.
RUN groupadd --system --gid 1000 monlet \
&& useradd --system --uid 1000 --gid monlet --home-dir /app --shell /usr/sbin/nologin monlet
WORKDIR /app
COPY --from=builder /app /app
RUN chown -R monlet:monlet /app
USER monlet:monlet
EXPOSE 8000
STOPSIGNAL SIGTERM
CMD ["uvicorn", "monlet_server.main:app", "--host", "0.0.0.0", "--port", "8000"]