перенесенная вторая и лабораторная 3

This commit is contained in:
2026-11-20 17:32:05 +03:00
parent 0ab3a341aa
commit 0a2eeda753
18 changed files with 975 additions and 13 deletions
+15
View File
@@ -0,0 +1,15 @@
FROM python:3.12.7-slim-bookworm
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
WORKDIR /app
COPY app.py server.py .
COPY messenger ./messenger
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN useradd --create-home --uid 10001 appuser
USER appuser
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=2s --retries=3 CMD python -c "from urllib.request import urlopen; urlopen('http://127.0.0.1:8080/health/ready', timeout=2)"
CMD ["python", "server.py"]