Собрать стенд lab4 с вложениями в приватном S3-bucket.

Метаданные остаются в PostgreSQL, байты — в RustFS, чтобы скачивание пережило остановку одной реплики API.
This commit is contained in:
samsik
2026-11-06 08:49:44 +03:00
parent ec540a1a72
commit 11c8c03984
32 changed files with 2348 additions and 50 deletions
+31
View File
@@ -0,0 +1,31 @@
FROM python:3.12.6-slim-bookworm
RUN groupadd --system --gid 10001 app \
&& useradd --system --uid 10001 --gid app --no-create-home --shell /usr/sbin/nologin app
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY --chown=app:app src/ /app/
COPY --chown=app:app migrations/ /app/migrations/
USER app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
APP_HOST=0.0.0.0 \
APP_PORT=8080 \
APP_ENV=lab
EXPOSE 8080
ARG BUILD_ID=dev
LABEL lab.build-id=$BUILD_ID
STOPSIGNAL SIGTERM
HEALTHCHECK --interval=10s --timeout=3s --start-period=8s --retries=5 \
CMD python3 -c "import urllib.request,sys; urllib.request.urlopen('http://127.0.0.1:8080/health/ready',timeout=2); sys.exit(0)"
CMD ["python3", "/app/server.py"]