Implement lab 2 PostgreSQL sessions and Redis profile cache

This commit is contained in:
2026-11-19 10:47:21 +03:00
parent 65003b6119
commit 370d947132
31 changed files with 1381 additions and 19 deletions
+14
View File
@@ -0,0 +1,14 @@
FROM python:3.12.8-slim-bookworm
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt && useradd --uid 10001 --create-home app
COPY src/ src/
COPY migrations/ migrations/
COPY scripts/ scripts/
COPY tests/ tests/
COPY contracts/ contracts/
COPY lab.json .
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
USER app
EXPOSE 8080
CMD ["sh", "-c", "python -m src.db && exec gunicorn --bind 0.0.0.0:8080 --workers 2 --threads 4 --timeout 30 src.app:app"]