Выполнила лабораторную 2

This commit is contained in:
2026-11-12 17:17:54 +03:00
parent 65003b6119
commit 8232404176
20 changed files with 856 additions and 33 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"]