lab6: добавить наблюдаемость и закрыть критерии оценки 5

This commit is contained in:
Wladislava1
2026-11-16 22:04:25 +03:00
parent 470d9d6f1e
commit 802e4b58c2
61 changed files with 7420 additions and 23 deletions
+28
View File
@@ -0,0 +1,28 @@
FROM python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/src \
APP_HOST=0.0.0.0 \
APP_PORT=8080 \
PIP_DEFAULT_TIMEOUT=120
WORKDIR /app
RUN useradd --uid 10001 --create-home --shell /usr/sbin/nologin app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade pip==25.0.1 \
&& pip install --no-cache-dir -r /app/requirements.txt
COPY migrations /app/migrations
COPY src /app/src
USER 10001
EXPOSE 8080
HEALTHCHECK --interval=5s --timeout=3s --start-period=25s --retries=8 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/health/ready', timeout=2)"
CMD ["python", "/app/src/main.py"]