ЛР4 на 3

Co-authored-by: Югай Артур Рустамович <f1ekserr@yandex.ru>
This commit is contained in:
2026-11-16 22:00:33 +03:00
co-authored by Югай Артур Рустамович
parent ec540a1a72
commit 0c5c19bb09
44 changed files with 3722 additions and 42 deletions
+15
View File
@@ -0,0 +1,15 @@
FROM python:3.13.14-slim-bookworm@sha256:67a1e1f215ccda113cfc024e8639049257e88f273898f595b61476d128d387e8
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONUTF8=1 \
APP_HOST=0.0.0.0 APP_PORT=8080 APP_ENV=lab
WORKDIR /app
COPY requirements.lock .
RUN python -m pip install --no-cache-dir -r requirements.lock \
&& useradd --uid 10001 --create-home messenger
COPY src ./src
COPY migrations ./migrations
USER messenger
EXPOSE 8080
HEALTHCHECK --interval=5s --timeout=4s --start-period=10s --retries=6 \
CMD python -c "import os,urllib.request; urllib.request.urlopen('http://127.0.0.1:'+os.environ['APP_PORT']+'/health/ready',timeout=3).close()"
CMD ["python", "-m", "src"]