ЛР 3: Балансировка API и отказ реплики

This commit is contained in:
2026-12-02 00:16:41 +03:00
parent 0ab3a341aa
commit 25f666a3e8
22 changed files with 993 additions and 18 deletions
+17
View File
@@ -0,0 +1,17 @@
FROM python:3.12.8-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
APP_HOST=0.0.0.0 \
APP_PORT=8080
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt \
&& adduser --disabled-password --gecos "" app
COPY app.py /app/app.py
COPY migrations /app/migrations
USER app
EXPOSE 8080
CMD ["python", "/app/app.py"]