lab6: OTel collector, Prometheus/Loki/Tempo, Grafana dashboard

This commit is contained in:
2026-11-19 20:24:23 +03:00
parent 470d9d6f1e
commit 258013b2d6
55 changed files with 2381 additions and 40 deletions
+39
View File
@@ -0,0 +1,39 @@
# syntax=docker/dockerfile:1.7
FROM python:3.12-slim AS runtime
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=60 \
PIP_RETRIES=2
WORKDIR /app
COPY requirements.txt .
# Пробуем несколько зеркал по очереди. Первое, которое ответит, используется.
RUN --mount=type=cache,target=/root/.cache/pip \
set -e; \
for idx in \
"https://pypi.depkit.ru/simple/" \
"https://pypi-mirror.gitverse.ru/simple" \
"https://pypi.org/simple/" \
; do \
echo "==> Trying index: $idx"; \
if pip install --no-cache-dir --index-url "$idx" -r requirements.txt; then \
echo "==> OK: $idx"; \
exit 0; \
fi; \
echo "==> FAILED: $idx"; \
done; \
echo "==> All indexes failed"; \
exit 1
COPY src ./src
RUN useradd -r -u 10001 -s /usr/sbin/nologin appuser
USER appuser
EXPOSE 8080
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8080", "--workers", "1"]