Implement Lab 7 service security
Application / https-smoke (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
dmice9
2026-12-03 20:56:06 +03:00
parent 20afc2c790
commit 9bf101b322
57 changed files with 3802 additions and 53 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,socket; socket.create_connection(('127.0.0.1',int(os.environ['APP_PORT'])),3).close()"
CMD ["python", "-m", "src"]