Собрать стенд lab3: балансировка, идемпотентность и трек 1

This commit is contained in:
Wladislava1
2026-11-06 16:04:28 +03:00
parent 0ab3a341aa
commit d9e13a06d9
42 changed files with 3602 additions and 33 deletions
+27
View File
@@ -0,0 +1,27 @@
FROM python:3.12.10-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/src \
APP_HOST=0.0.0.0 \
APP_PORT=8080
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"]