ЛР 3: балансировка, 2 реплики API и общая идемпотентность (оценка 3)

This commit is contained in:
Яковлев Матвей Дмитриевич
2026-11-16 23:34:49 +01:00
parent 0ab3a341aa
commit c8ee2a50b8
18 changed files with 1204 additions and 21 deletions
+16
View File
@@ -0,0 +1,16 @@
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PIP_NO_CACHE_DIR=1
WORKDIR /opt/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY app/ ./app/
COPY migrations/ ./migrations/
RUN useradd --create-home --uid 10001 appuser && chown -R appuser:appuser /opt/app
USER appuser
EXPOSE 8080
CMD ["python", "-m", "app"]