ЛР 4 — БПИ2303 — Щербаков — на 3

This commit is contained in:
2026-11-13 14:02:00 +03:00
parent ec540a1a72
commit 125a5e6409
39 changed files with 2112 additions and 50 deletions
+14
View File
@@ -0,0 +1,14 @@
FROM python:3.12.12-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 APP_HOST=0.0.0.0 APP_PORT=8080
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt \
&& groupadd --gid 10001 messenger \
&& useradd --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger
COPY --chown=10001:10001 src/ ./src/
COPY --chown=10001:10001 migrations/ ./migrations/
USER 10001:10001
EXPOSE 8080
STOPSIGNAL SIGTERM
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=5 CMD ["python", "-m", "src.healthcheck"]
CMD ["python", "-m", "src.server"]