Complete lab 7 security infrastructure

This commit is contained in:
Yuliiiaaaa
2026-11-30 21:23:07 +03:00
parent 20afc2c790
commit c00d245263
55 changed files with 3515 additions and 28 deletions
+13
View File
@@ -0,0 +1,13 @@
FROM python:3.12.7-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_DISABLE_PIP_VERSION_CHECK=1
RUN groupadd --gid 10001 appuser && useradd --uid 10001 --gid appuser --no-create-home --shell /usr/sbin/nologin appuser
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/ /app/src/
COPY migrations/ /app/migrations/
COPY worker.py /app/worker.py
COPY scripts/ /app/scripts/
ENTRYPOINT ["python", "/app/scripts/container_entrypoint.py"]
USER 10001:10001
CMD ["uvicorn", "src.app:app", "--host", "127.0.0.1", "--port", "8080", "--limit-concurrency", "64", "--timeout-keep-alive", "5"]