Lab7: HTTPS, mTLS, OpenBao, трек 2 PKI на оценку 5
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Wladislava1
2026-11-17 00:25:48 +03:00
parent 20afc2c790
commit 54dcf70ea6
88 changed files with 8930 additions and 58 deletions
+30
View File
@@ -0,0 +1,30 @@
FROM python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/src \
APP_HOST=0.0.0.0 \
APP_PORT=8443 \
PIP_DEFAULT_TIMEOUT=120
WORKDIR /app
RUN useradd --uid 10001 --create-home --shell /usr/sbin/nologin app \
&& mkdir -p /certs/private \
&& chown -R app:app /certs
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade pip==25.0.1 \
&& pip install --no-cache-dir -r /app/requirements.txt
COPY migrations /app/migrations
COPY src /app/src
USER 10001
EXPOSE 8443
HEALTHCHECK --interval=5s --timeout=3s --start-period=45s --retries=10 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8081/health/ready', timeout=2)"
CMD ["python", "/app/src/main.py"]