Complete lab 7 security implementation

This commit is contained in:
2026-11-26 22:26:21 +03:00
parent 20afc2c790
commit df47ebd9f1
89 changed files with 9765 additions and 53 deletions
Executable
+28
View File
@@ -0,0 +1,28 @@
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# Закрываем fixed-CVE в базовом Debian (apt, libpcre2, zlib и т.д.)
RUN apt-get update \
&& apt-get upgrade -y \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY src ./src
COPY scripts ./scripts
COPY migrations ./migrations
COPY alembic.ini ./
RUN useradd --create-home --shell /usr/sbin/nologin appuser \
&& chown -R appuser:appuser /app
USER appuser
EXPOSE 8080
CMD ["python", "-m", "src.main"]