Harden production workflows and agent admission
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user