Реализовать лабораторную 7: mTLS, OpenBao и защита worker

This commit is contained in:
wpyatzy
2026-12-04 20:35:40 +03:00
parent 20afc2c790
commit 1b865eac83
146 changed files with 9552 additions and 87 deletions
+28
View File
@@ -0,0 +1,28 @@
FROM minio/mc@sha256:a7fe349ef4bd8521fb8497f55c6042871b2ae640607cf99d9bede5e9bdf11727 AS mc
FROM python:3.11.11-slim
ENV PYTHONPATH=/app \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
APP_HOST=0.0.0.0 \
APP_PORT=8080 \
SESSION_TTL_SECONDS=3600
RUN apt-get update && apt-get install -y --no-install-recommends haproxy openssl && rm -rf /var/lib/apt/lists/*
COPY --from=mc /usr/bin/mc /usr/local/bin/mc
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
ARG APP_REVISION=lab7-v1
ENV APP_REVISION=$APP_REVISION
COPY service.py security_middleware.py /app/
COPY telemetry.py observe.py app.py attachments.py pipeline.py worker.py publisher.py transform.py janitor.py manage.py migrate.py /app/
COPY migrations /app/migrations
COPY scripts /app/scripts
COPY tests /app/tests
COPY contracts /app/contracts
COPY lab.json /app/lab.json
EXPOSE 8080
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
USER 1000:1000