Реализовать обязательный минимум: балансировку, общие повторы и сохранность при отказе

This commit is contained in:
2026-10-23 18:35:04 +03:00
parent 366b4be7b8
commit bdcf00a412
28 changed files with 288 additions and 19 deletions
+2 -2
View File
@@ -7,6 +7,6 @@ RUN pip install --no-cache-dir -r requirements.lock.txt
COPY src/ src/
COPY migrations/ migrations/
USER appuser
HEALTHCHECK --interval=5s --timeout=5s --start-period=15s --retries=5 CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health/ready')"
HEALTHCHECK --interval=2s --timeout=2s --start-period=10s --retries=3 CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health/ready',timeout=1)"
EXPOSE 8080
CMD ["sh", "-c", "python -m src.migrate && exec python -m uvicorn src.app:app --host 0.0.0.0 --port 8080 --timeout-graceful-shutdown 8"]
CMD ["python", "-m", "uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "8080", "--timeout-graceful-shutdown", "8", "--timeout-keep-alive", "2", "--no-access-log"]