forked from mtusi2026/mtusi2026lab7
feat: complete lab 7 for grade 4
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
FROM python:3.11.16-slim-bookworm@sha256:a36c24f9cbdf4fd0f52d67f0823eeac19c2028c637cecc392d97f980d4fec56b
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --no-cache-dir -r requirements.txt && python -m pip check \
|
||||
&& useradd --uid 10001 --no-create-home --shell /usr/sbin/nologin appuser
|
||||
COPY src/ ./src/
|
||||
COPY scripts/uds_probe.py /app/uds_probe.py
|
||||
COPY db/ ./db/
|
||||
COPY contracts/openapi.json ./contracts/openapi.json
|
||||
USER 10001:10001
|
||||
STOPSIGNAL SIGTERM
|
||||
CMD ["python", "-m", "uvicorn", "src.main:app", "--uds", "/run/api/api.sock", "--no-access-log", "--no-proxy-headers", "--timeout-graceful-shutdown", "5"]
|
||||
Reference in New Issue
Block a user